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

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

其实只需要在
nextFocusLeft遥控左键
nextFocusRight遥控右键
(还有其他属性)里面定义好控件()就好了
自定义的一些控件自己去Google吧

你可能感兴趣的:([Androidstudio]的坑之适配红外遥控器)