摘要:
Bundle类是一个key-value对,“A mapping from String values to various Parcelable types.”1. 声明Bundle对象实例,压入键值对,并传递对象实例: /** * Indicate that the connection... 阅读全文
摘要:
Bundle类是一个key-value对,“A mapping from String values to various Parcelable types.”1. 声明Bundle对象实例,压入键值对,并传递对象实例: /** * Indicate that the connection... 阅读全文
摘要:
[代码来源:GOOGLE原生示例BluetoothChat][代码功能:实现对安卓蓝牙设备检测到的事件广播的处理][代码如下] // The BroadcastReceiver that listens for discovered devices and // changes the titl... 阅读全文
摘要:
[PS:还是以GOOGLE原生的BluetoothChat为例]1.startActivity与startActivityForResult的区别startActivity( )仅仅是跳转到目标页面,若是想跳回当前页面,则必须再使用一次startActivity( )。startActivityFo... 阅读全文
摘要:
之前写一些小程序的时候,都是拿来模板就用,没有细究过良好的编码规范,在看GOOGLE原生的例子的时候,发现很多编码规范可以借鉴,同样以BluetoothChat这个原生工程中的主UI Activity(BluetoothChat.java)来举例吧:1. 相关控制变量(调试开关)和成员变量的声明: ... 阅读全文
|