简体   繁体   English

焦点在两个片段之间移动

[英]Focus move between two fragments

Hello friends I am developing an Tv application in which screen have two visible fragments. 您好朋友,我正在开发一个电视应用程序,其中屏幕上有两个可见的片段。
Let my first FragmentA have RecyclerView with Grid orientation and same in FragmentB. 让我的第一个FragmentA具有带有Grid方向的RecyclerView,并且在FragmentB中也是如此。
And
FragmentA have focus now i want to move to fragmentB by using DPAD navigation. FragmentA现在具有焦点,我想使用DPAD导航移至fragmentB。

But i am unable to move fragmentB. 但是我无法移动fragmentB。 is it possible to move. 是否可以移动。 if "yes" please advice. 如果“是”,请指教。 else Please advice for alternate of it. 否则,请提出建议。

Thanks in Advance. 提前致谢。

Remove the focus of the parent layout of the recycler item and add these only to the recycler view that has to be focused or higlighted while DPAD navigation is done. 删除回收站项目的父级布局的焦点,并将这些焦点仅添加到完成DPAD导航时必须聚焦或突出显示的回收站视图中。

android:focusable="true"
android:focusableInTouchMode="true"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM