1

I'm working with the LeftNavView Libary with Google TV, I have found that I can respond to events when a tab is selected or unselected, but I would like to change an ImageView outside of the tab when Focus has changed (i.e. when using the D-Pad to navigate, but not when it is necessarily selected).

The idea is to change an ImageView in another view when navigating around the tabs. Is there a way to easily do this that I'm not seeing?

kingargyle
  • 1,239
  • 10
  • 15

1 Answers1

1

As there is no way to get the views used for the tabs, i think you will have to extend the LeftNavBarLibrary by implementing some methods either to set a View.OnFocusChangeListener to the ListItemViews (the LeftNavBar uses a ListView for the tabs) or to get the ListItemViews itself and then set the listener. See TabAdapter in TabDisplay.java for this. I did something similar to programmatically set a custom TabBackground by setting a RessourceId to the LeftNavBar, that passes it to the TabDisplay, that passes it to the TabAdapter.

Matthias
  • 163
  • 5
  • Thanks, I waded my way through this and figured I was going to have to modify and extend the LeftNavBar to do what I wanted. I'm looking at a couple of different alternatives to the navigation for my app, but this gives me a general direction I need to go. – kingargyle Jan 07 '13 at 01:13