Android Custom EditText is resized by keyboard open and close -
i implemented custom background edittext fields because think defaults edittexts tall & have padding. anyway, new edittext drawable backgrounds displaying fine, fields shrink when open keyboard , expand original (custom) size when close keyboard. behavior must overridable in way haven't stumbled across. can help, please? i've read imeoptions article @ dev android site , nothing there jumps out @ me @ possible solution problem. thanks!
here edittext - each edittext in own layout because needed add padding between fields:
<linearlayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="vertical" android:paddingbottom="5dip" android:paddingleft="3dip" android:paddingright="3dip"> <edittext android:id="@+id/join_firstname" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/joinedittextselector" android:padding="5dip" /> <!-- android:layout_weight="1" --> </linearlayout> here selector:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/join_field_bg_default" /> <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/join_field_bg_default" /> <item android:state_pressed="true" android:drawable="@drawable/join_field_bg_default" /> <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/join_field_bg_selected" /> <item android:state_enabled="true" android:drawable="@drawable/join_field_bg_default" /> <item android:state_focused="true" android:drawable="@drawable/join_field_bg_selected" /> <item android:drawable="@drawable/join_field_bg_default" /> i've tried adjustresize , adjustpan android:windowsoftinputmode setting of activity edittext used in , neither have worked. again advice on this!
you have provide images various states defining them in xml resource. people lot buttons.
Comments
Post a Comment