I am searching how to move the focus from one fragment to another fragment.
I am watching to below page to implement the keyboard navigation. keyboard navigation
Our app is only provided to landscape table. So it has 2 fragments. (Left side, right side) And what I want to do is when I input "->" right arrow keyboard on left side fragment, how can I change the focus to the right side fragment? And it should be able to come back from contents fragment to menu fragment.
Is it possible? then Can I know a hint, please?
I am adding more details about this question.
This question is about focus navigation using the HW keyboard.
I already write the guide document link (https://developer.android.com/training/keyboard-input/navigation)
Using below attributes, I can move the focus. - android:nextFocusUp - android:nextFocusDown - android:nextFocusLeft - android:nextFocusRight
But our app is consist of 2 fragments. In the left menu fragment, I can move the focus using the arrow keyboard. And when I input "right arrow" or "enter" keyboard or anything, I want to move the focus to the right side contents fragment. And when I input the arrow keyboard, (up, down, left, right) the focus is moved in the right side fragment not left side.
But if I want to come back from the right side to left side, I want to do that.
For example, I moved the focus to the final view, and I input "right or down arrow", I should come back to the left side fragment.
Following the guide document (https://developer.android.com/training/keyboard-input/navigation), this is defined on the xml file.
It means I can move the focus only in the xml file.
What I want to do is change the focus beyond the xml file.