Mark M. |
how can I help you today?
|
Yash |
Have you worked with D-pad navigation on Google TV?
|
Mark M. |
not much and not recently
|
Yash |
This question is related to focus more than navaigation
|
Mark M. |
feel free to ask, but I don't put high odds that I'll be able to help
|
Yash |
My question is how can you change focus between a
List Fragment & Grid Fragment? This is my scenario: I have a list
fragment on the left populated by some list items. When I click on any
list item, the Grid Fragment on the right gets populated but I want the
focus to remain on the list item selected/clicked.
|
Yash |
When I hit right while on the list fragment, focus should move to Grid Fragment. Somehow, this does not work.
|
Mark M. |
have you called setNextFocusRight() on the ListView in the ListFragment, to tell it to move focus to the GridView?
|
Yash |
android:nextFocusRight = "@id/...."
|
Mark M. |
then I have no idea why it would not work
|
Mark M. |
what did you set the android:nextFocusRight on? the ListView? or the ListFragment?
|
Mark M. |
you might need to actually set it on the ListView, by means of setNextFocusRight()
|
Mark M. |
I don't know if android:nextFocusRight will cascade down from the <fragment> to the ListView
|
Yash |
Hmm, that could possibly be the problem
|
Mark M. |
if you have another question, chime in
|
Yash |
Your tip helped! Thank you!
|
Yash |
I also found out another view (not the Grid View) was gaining focus
|
Yash |
I don't have any more questions, thank you!
|
Mark M. |
well that's it for today's chat
|
Mark M. |
next one is Tuesday, 4pm Eastenr
|