android - Keyboard closing the edit text -
i have dialog fragment edit text in it. set height,width of dialog fragment using -
@override public void onresume(){ super.onresume(); displaymetrics displaymetrics = new displaymetrics(); getactivity().getwindowmanager().getdefaultdisplay().getmetrics(displaymetrics); int height = displaymetrics.heightpixels; int width = displaymetrics.widthpixels; getdialog().getwindow().setlayout((int)(width * 0.8),(int)(height * 0.8)); }
the problem when click on edittext of dialog fragment, key board appears , closes edittext , cannot see typing. see have typed, have close keyboard. how make dialog fragment adjust when keyboard opens up.
have tried this: android:imeoptions="flagnoextractui"
. can add edittext. hope solves problem.
Comments
Post a Comment