Я создал ExpandableListView с довольно сложным дочерним элементом xml. Он содержит TextView, флажок и EditText. Часть из них ниже:ExpandableListView EditText дочернего элемента не может поддерживать фокус
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:stretchColumns="1">
<TableRow>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:id="@+id/lblData1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dip"
android:paddingTop="2dp"
android:layout_marginLeft="4dp"
android:text="@string/lblTitle1"
android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft"/>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content" android:selectAllOnFocus="true">
</EditText>
</TableRow>
</TableLayout>
ListView отображает список хорошо, я могу видеть мои дочерние элементы с соответствующими виджетами, но когда я нажимаю внутри EditText, он выводит на экран клавиатуры для доли секунды и фокуса продвигается к следующему ребенку и скрывает клавиатуру (фокус потерян, а не переходит к следующему EditText).
Как я могу предотвратить это? Я бы хотел написать текст внутри EditTexts.
Может также быть сделано в XML: android: descendantFocusability = "afterDescendants" ... Потребовалось несколько часов поиска, чтобы найти этот ответ. Спасибо @Nestor –
@ShirishHirekodi Рад, что это могло помочь :) – Nestor