You can solve this by adding android:descendantFocusability="beforeDescendants" in your ListView and android:windowSoftInputMode="adjustPan" for your activity in the app Manifest. Here are some examples
<ExpandableListView android:id="@+id/productList" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@+id/search" android:layout_below="@+id/search" android:padding="5dp" android:descendantFocusability="beforeDescendants"/> <activity android:name=".myActivity" android:label="@string/app_name" android:screenOrientation="sensorPortrait" android:windowSoftInputMode="adjustPan"/>
If the above solution doesn't work then you have to listen for the onFocusChange listener on the EditText and set a variable to keep track. So when the view get rendered again in your getView or getChildView method you can set the focus back to that EditText.
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.