Jessica ARAYE
Jessica ARAYE

Reputation: 21

How to reset the focus on the button in the middle of control row Android-tv?

The ControlsFragment extends VideoFragment() in which extends PlaybackFragment(). I am using leanback v27.0.2. The problem is once i change the focus from the middle to the left (Rewind button) or to the right (forward button) and the controls fragment disappear on reappear the focus doesn't reset to the middle. I want the focus to reset and appear in the middle on top of the play pause button if the focus wasn't in the middle.

Can anyone has an idea of how to fix this issue ?

Thanks :)

Upvotes: 1

Views: 739

Answers (1)

Jessica ARAYE
Jessica ARAYE

Reputation: 21

I found out that i am using leanback version 27.0.2 In this version we don't have access to the ControlBar class to use the method setDefaultFocusToMiddle. If we need to reset the focus to the middle the leanback version 23.1.1 will do the job.

Upvotes: 1

Related Questions