I have recently face this problem and I want to share with you my solution.
Problem:
MainList.xml
<ListView
android:id="@+id/listViewServ"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
RowList.xml
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/editText1"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="number"/>
Now, I'm going to give you my solution posting my own question.
I have seen that some solutions are using:
android:descendantFocusability="beforeDescendants"
in the layout of the definition of the list.
For me this wasn't necessary. The problem was fixed using android:windowSoftInputMode="adjustPan":
<activity
android:name="mainActivity"
android:windowSoftInputMode="adjustPan"
android:label="@string/app_name" >
</activity>
in the Manifest.xml.
But you have to make sure that this line of code goes in the activity where you are defining the TabHost or TabActivity!!!.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With