How to include the HeaderView in ListActitivity in xml?

Put your problem here if it does not fit any of the other categories.

How to include the HeaderView in ListActitivity in xml?

Postby sommeralex » Wed Mar 19, 2008 4:59 pm

Hello!

I have a little Problem handling the headerView in my ListActivity and the listActivity in generel..

Whats works:

Adding a HeaderView to my ListActivitiy in Code

What doesnt work:

Adding a HeaderView in my ListActivitiy in a XML (is there a way for doing so?)

The trouble is, that if i add a headerView, the key-focus handling is not working the way as i want anymore. The items in my listView are not "orange" anymore when being selected - Therefore i think i should implement something like this for my headerView:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.    
  2.  
  3.  
  4.  
  5. android:nextFocusDown="@+id/mainlistView"
  6.  
  7. android:nextFocusUp="@+id/mainlistView"
  8.  
  9. android:nextFocusLeft="@+id/mainlistView"
  10.  
  11. android:nextFocusRight="@+id/mainlistView"
  12.  
  13.  
  14.  
  15.  
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


but i cant do this, because i dont know how i have to name the headerView element in my listView Layout xml.

any suggestions?! :roll:

hence:

if i am using the keys, the listViews are NOT orange on focus when using my headerView

if i am using the keys, the listViews ARE orange on focus when using NO headerView

if i am using the mouse, everything is "orange" when being selected..
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 22 guests