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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -