I am working on android applications. In my page I kept listheader,listview and listfooter. I had disabled the focus of listview but when i am trying to disable the header and footer it is not appying ?
MyCode:
For listview I had disabled the focus by giving
lvAdapter adapter = new lvAdapter(this,list){
public boolean areAllItemsEnabled() {
return false; }
public boolean isEnabled(int position) {
return false; } };
listheader.xml
I have changed in my xml file by giving focusable=false in textview
<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>
listfooter.xml
I have changed in my xml file by giving focusable=false in 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>
But even then the focus of header and footer had not disabled. Pleae help me regarding this
Thanks in advance…
While adding Header you can use
public void addHeaderView (View v, Object data, boolean isSelectable)as
Same way for adding Footer also
public void addFooterView (View v, Object data, boolean isSelectable)as