0

I have a tabbed application. Each tab has got a custom listview. I am not able to track navigation buttons in a custom list view. I tried the following

@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
    Log.i(TAG_NAME, "key event: " + keyCode);
    if(keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
        Log.i(TAG_NAME, "Directional DOWN pad pressed");
    }
}

For instance, say, I press DPAD_DOWN key to select one of the items in a custom list view. But, the list item is not highlighted. So I do not know which one is selected.

The above things works well if the screen is a ListActivity. Have you got any idea?

Let me know if you find anything confusing.

Renjith
  • 3,457
  • 5
  • 46
  • 67
  • I had such a problem in the past, in my opinion it is necessary to make the method return value, but true or false - I don't remember. Try both. – jimpanzer Apr 11 '13 at 09:37
  • That doesn't make any change! Moreover I noticed that when I press center key, HOME tab automatically becomes the current tab. I am not using setCurrentTab(int) anywhere. Any idea what's happening? – Renjith Apr 11 '13 at 09:55

0 Answers0