[Androidstudio]的坑之适配红外遥控器

近期接触了Android盒子应用需要适配一个红外遥控。
接触呢就需要找一些资料啦,可是在百度上左搜右搜都不是我所需要的,索性找到一个Demo。
其实红外遥控也没有这么这么的神秘,适配最基本的东西 只需要在XML里面完成
<Button
android:id=”@+id/”
android:layout_width=”78dp”
android:layout_height=”145dp”
android:nextFocusLeft=”@+id/”
android:nextFocusRight=”@+id/”
android:text=”game” />

其实只需要在
nextFocusLeft遥控左键
nextFocusRight遥控右键
(还有其他属性)里面定义好控件()就好了
自定义的一些控件自己去Google吧
个人网站:http://didi-hi.com

    原文作者:风雨byt
    原文地址: https://www.jianshu.com/p/3304c89d17c6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞