Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I got it sorted, this code runs smoothly and it recognizes key press of DONE button from soft keyboard. </p> <p>Layout file: </p> <pre><code> &lt;EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:imeOptions="actionDone" android:inputType="numberDecimal" /&gt; &lt;Button android:id="@+id/button1" android:layout_width="80dp" android:layout_height="30dp" android:text="NEXT" android:textSize="10sp" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>.java file:</p> <pre><code>package com.example.drywallcalculator102v; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.inputmethod.EditorInfo; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; public class FirstActivity extends Activity { private EditText editText; private Button btnNext; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_firstactivity); btnNext = (Button) findViewById(R.id.button1); btnNext.setEnabled(false); editText = (EditText) findViewById(R.id.editText2); editText.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { // TODO Auto-generated method stub if (actionId == EditorInfo.IME_ACTION_DONE) { // do your stuff here btnNext.setEnabled(true); } return false; } }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload