Android 如何禁用listheader和footer的焦点?
我正在开发android应用程序。在我的页面中,我保留了listheader、listview和listfooter。我已经禁用了listview的焦点,但是当我试图禁用页眉和页脚时,它没有应用 霉菌代码: 对于listview,我通过给出Android 如何禁用listheader和footer的焦点?,android,Android,我正在开发android应用程序。在我的页面中,我保留了listheader、listview和listfooter。我已经禁用了listview的焦点,但是当我试图禁用页眉和页脚时,它没有应用 霉菌代码: 对于listview,我通过给出 lvAdapter adapter = new lvAdapter(this,list){ public boolean areAllItemsEnabled() { return false; } public boolean isEnabled
lvAdapter adapter = new lvAdapter(this,list){
public boolean areAllItemsEnabled() {
return false; }
public boolean isEnabled(int position) {
return false; } };
listheader.xml
我在xml文件中更改了文本视图中的focusable=false
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#000000"
android:focusable="false"
android:clickable="false"
android:enabled="false"
android:textSize="12dip" >
</TextView>
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#000000"
android:focusable="false"
android:clickable="false"
android:enabled="false"
android:textSize="12dip" >
</TextView>
listfooter.xml
我在xml文件中更改了文本视图中的focusable=false
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#000000"
android:focusable="false"
android:clickable="false"
android:enabled="false"
android:textSize="12dip" >
</TextView>
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#000000"
android:focusable="false"
android:clickable="false"
android:enabled="false"
android:textSize="12dip" >
</TextView>
但即便如此,页眉和页脚的焦点也没有被禁用。请帮我解决这个问题
提前感谢…在添加标题时,您可以使用 作为 添加页脚的方法也一样 作为