final Intent intent = new Intent(action)
if(UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())){
int flag = characteristic.getProperties()
int format = -1
if((flag &0x01)!= 0){
format = BluetoothGattCharacteristic.FORMAT_UINT16
Log.d(TAG,"Heart Rate format UINT16.")
}else{
format = BluetoothGattCharacteristic.FORMAT_UINT8
Log.d(TAG,"Heart Rate format UINT8.")
}
fragment可以在xml中添加,也可以直接新建ListViewFragemnt extends Fragment ,在这种方法的OnCreateView方法中,使用layoutinflator加载xml文件View,返回View,然后就是根据View去初始化ListView,数据直接从数据库取出,在适配器Adapter中更新显示数据。View view = inflater.inflate(R.layout.fragment_record, null)这句话应该是View view = inflater.inflate(R.layout.fragment_record, container,false)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)