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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -