mDeviceList;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_temp);
//初始化控件
initView();
//初始化数据
initData();
//控件监听
setListener();
}
/**初始化控件**/
private void initView(){
mTvTest=findViewById(R.id.mTvTest);
mBtnTest=findViewById(R.id.mBtnTest);
mRecyclerView=findViewById(R.id.recyclerView);
}
private void initData(){
mDeviceList=new ArrayList<>();
//获取蓝牙已配备列表
if(BluetoothScaleManager.getInstance().isSupportBluetooth()&&BluetoothScaleManager.getInstance().isBluetoothOpen()){
ListdeviceList = BluetoothScaleManager.getInstance().checkDevices();
if(!deviceList.isEmpty()){