android - Define windowSoftInputMode based on EditText -


is possible use android:windowsoftinputmode="adjustpan" activity overwrite value single edittext only?

i want change adjustresize in special case user has themed app in such way, search bar moved bottom @ runtime , in case need different windowsoftinputmode. single edittext, others don't want change anything.

any ideas how can achieve that?

you cannot specifiy on particular edittext. think using fragment application. there provision apply windowsoftinputmode particular fragment. hope may you.

put code on fragment in edittext contains, , apply particular fragment only.

for particular fragment:

add in oncreateview():

   getactivity().getwindow().setsoftinputmode(windowmanager.layoutparams .soft_input_mode_changed|windowmanager.layoutparams.soft_input_adjust_resize); 

or full activity:

add in manifest files as:

  <activity android:name=".mainactivity"      android:windowsoftinputmode="adjustresize"></activity> 

thanku !!!


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -