陈奇
2018-11-01 cdbaf79d124d46b69dc62b653fde55f9d40b5534
app/src/main/java/com/moral/yunfushao/adapter/BleDeviceAdapter.java
@@ -25,14 +25,10 @@
    protected void convert(ViewHolder holder, ScanResult scanResult, int position) {
        TextView tv_name = holder.getView(R.id.tv_name);
        BluetoothDevice device = scanResult.getDevice();
        if(!StringUtils.isEmpty(device.getName())){
            if(device.getName().contains("7drlb")){
                tv_name.setText("孕妇哨"+"\n"+device.getAddress());
            }else{
                tv_name.setText(device.getName()+"\n"+device.getAddress());
            }
        }else{
            tv_name.setText("未知设备"+"\n"+device.getAddress());
        if (!StringUtils.isEmpty(device.getName())) {
            tv_name.setText(device.getName() + "\n" + device.getAddress());
        } else {
            tv_name.setText("未知设备" + "\n" + device.getAddress());
        }
    }
}