I have created own keyboard for my application. Applciation contain
TableLayout that contain ArrayList of products.That table row created
dynamically & contain EditText also. When User click on the EditText,
it should get open keyboard. Up to this point working fine.
Problem is when user enter quantity & click done or Enter key,
editText.OnEditorActionListener(){.. method actionId take 0. But When
I run through the Android keyboard, actionId take 5 for done 6 for
Done.
Why It didn't take the actionId for my own keyboard ?
final EditText txtQty = new EditText(this);
txtQty.setHeight(1);
txtQty.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT, 42));
txtQty.setInputType(InputType.TYPE_CLASS_PHONE);
txtQty.setImeOptions(EditorInfo.IME_ACTION_DONE);
txtQty.setSelectAllOnFocus(true);
txtQty.setTextSize(9);
txtQty.setVisibility(View.VISIBLE);
txtQty.setHint("0.0");
txtQty.setHighlightColor(R.color.green);
tr.addView(txtQty);
txtQty.setOnEditorActionListener( new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) {
Log.i("KeyBoard" ,"Inside the Edit Text");
if (actionId == EditorInfo.IME_ACTION_DONE ||actionId
== EditorInfo.IME_ACTION_NEXT ) { ......}
This is my code:
Please anybody help me this... more than three days spending time with
this part.I couldn't do it....
Please anybody help me this...
http://stackoverflow.com/questions/7659570/android-oneditoractionlistener-actionid-give-0-when-i-click-done-key
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en