0

I have a page (MPV) that has 2 fragments in it. One is a top row of 3 featured videos, and the lower fragment is a multi-row view for different REST endpoints. There is only one issue with navigation that I cannot for the life of me fix.

Here is a picture of the layout: Navigation Issue

When navigating "Down" from the FeatureRow Fragment (the 3 box row), I want the navigation to just give focus to the ContentRow Fragment (the 6.5 box row).

Is there a setting in the XML where I can specify that the FeatureRow is full-width so that DOWN would indicate to move into the ContentRow fragment? Right now, you have to hit LEFT in order to get it to move 'down', but UP works just fine to get back up into the Feature row.

There's so much code to add, I'll provide any code that one would think useful to troubleshoot this. It's basically just standard leanback navigation without any custom navigation code, so I'm assuming there's a setting to make it work.

asked Sep 10, 2023 at 2:35

1 Answer 1

0

The solution was very dumb.

Firstly, I had to set up a global focus listener to listen for focus changes to see where the focus was going.

OnGlobalFocusChangeListener()

Found out the focus was on rowContainer and not an item. Then discovered this line in my XML file for the home fragment rowContainer:

android:focusable="true"

This was allowing the container itself to be focused - not just the items inside of it. Removing that line eliminated the problem.

answered Oct 7, 2023 at 1:23
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.