0

I am developing a sample app in Android using phonegap framework. In my app I have multiple text fields and I want to access the device enter button and change the name 'go' to 'next' for customer. How can I overcome this?

codeMagic
  • 44,549
  • 13
  • 77
  • 93

2 Answers2

1

Try myEditText.setImeActionLabel("next",EditorInfo.IME_ACTION_UNSPECIFIED). IME_ACTION_UNSPECIFIED allows you to put whatever text you want in the button.

Ircover
  • 2,406
  • 2
  • 22
  • 42
  • Am asking phonegap framework not native code and thank you very much – Santhosh san Apr 16 '15 at 12:03
  • It is not native. It can be called in your Activity `onCreate` after `myEditText = (EditText) findViewById(R.id.myEditText)`. – Ircover Apr 16 '15 at 12:07
  • Am creating text fields are using html and javascript then how can i get (EditText) findViewById(R.id.myEditText) and am asking phonegap framework not in android native code. – Santhosh san Apr 16 '15 at 12:11
  • If you have any sample code for that send that code and see this link http://stackoverflow.com/questions/23823308/how-to-get-next-button-on-android-softkeyboard-in-place-of-go-button-in-phonegap – Santhosh san Apr 16 '15 at 12:12
0
public class MainActivity extends Activity {
Button b1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        b1=(Button)findViewById(R.id.button1);
        b1.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
               //your button name is first Go
                b1.setText("Next");
            }
        });
    }


}
  • Device Enter button name see this http://stackoverflow.com/questions/23823308/how-to-get-next-button-on-android-softkeyboard-in-place-of-go-button-in-phonegap – Santhosh san Apr 16 '15 at 12:06