Android ListView中的EditText-更改EditText的焦点
我有一个视图,其中包含一个ListViewAndroid ListView中的EditText-更改EditText的焦点,android,listview,android-listview,Android,Listview,Android Listview,我有一个视图,其中包含一个ListView <ListView android:id="@+id/products_list" android:layout_width="match_parent" android:descendantFocusability="afterDescendants" android:layout_height="0dp" android:layout_weight="1" /> 有没有关于如何不从第一次单击的编
<ListView
android:id="@+id/products_list"
android:layout_width="match_parent"
android:descendantFocusability="afterDescendants"
android:layout_height="0dp"
android:layout_weight="1" />
有没有关于如何不从第一次单击的编辑文本中丢失焦点的想法?在布局XML中:
<ListView
android:id="@+id/products_list"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent"
android:descendantFocusability="beforeDescendants"
/>
在Mainfest.xml中:
<activity android:name= ".yourActivity" android:windowSoftInputMode="adjustPan"/>
希望这对你有帮助 它可以工作-thx。但是,有没有什么方法可以保持调整大小的视图的功能,而不失去对单击项目的关注?
<activity android:name= ".yourActivity" android:windowSoftInputMode="adjustPan"/>