安卓tv开发心得

安卓的linearLayout和RelativeLayout自带focussearch

开发TV不能用constraintLayout,不能自己找焦点,很坑

所以一般情况下 没必要去调用nextfocus上下左右,

有大佬推荐用tvRecyclerView来开发tv,看着很完美.

在popupwindow的时候弹框的时候

一定要设置属性

        popupWindow.isFocusable=true
        popupWindow.isOutsideTouchable=true
        popupWindow.isTouchable=true

布局文件中所有的想要焦点的控件设置

<style name="clickableStyle">
    <item name="android:focusable">true</item>
    <item name="android:focusableInTouchMode">true</item>
    <item name="android:clickable">true</item>
</style>
 
发布了137 篇原创文章 · 获赞 29 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/xiexiaotian11/article/details/103977010