EditText and keyboard in android app -


i have problem delete key.

when add edittext app can write, can't delete chars.

what wrong?

<edittext                 android:id="@+id/typecode"                 android:layout_width="wrap_content"                 android:layout_height="40dp"                 android:layout_alignparenttop="true"                 android:layout_margintop="10dp"                 android:layout_torightof="@+id/textview1"                 android:ems="10"                 android:gravity="center"                 android:hint="@string/type_code"                 android:inputtype="textnosuggestions"                 android:imeoptions="actiondone"                 android:lines="1"                 android:maxlength="6"                 android:singleline="true"                 android:textsize="14sp" /> 

it problem:

@override     public boolean dispatchkeyevent(keyevent event){         if (event.getkeycode() == keyevent.keycode_back){              alertdialog.show();         }             return false;     } 

change to:

@override     public boolean dispatchkeyevent(keyevent event){         if (event.getkeycode() == keyevent.keycode_back){              alertdialog.show();               return false;         }else{               return super.dispatchkeyevent(event);         }     } 

tnx, help.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -