android softkeyboard not closed after clear the task
In my application i have one edittext with one image for add the task into
database.My problem is when i add the task in database after that the
android soft keyboard visible instead of closing.I am using all those
examples in stack overflow but not getting result please any one help
me...
<EditText
android:id="@+id/edittextidAddTodayTask"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/edittextselector"
android:drawableRight="@drawable/addtask"
android:hint="AddTask"
android:singleLine="true"
/>
MyOnRightdrawable listener:
edittextAddTask.setOnTouchListener(new RightDrawableOnTouchListener(
edittextAddTask) {
@Override
boolean onDrawableTouch(MotionEvent event) {
//Add the task in db.
//I am using this code but not working for me
/*InputMethodManager mgr =
(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.hideSoftInputFromWindow(edittextAddTask.getWindowToken(),
0);*/
}
My Screenshot for edittext:
No comments:
Post a Comment