您现在的位置是:主页 > news > 网站如何做交换链接/如何优化关键词的方法

网站如何做交换链接/如何优化关键词的方法

admin2025/4/28 21:18:00news

简介网站如何做交换链接,如何优化关键词的方法,jsp做的网站效果,三亚网我正在尝试使用可用的蓝牙设备进行列表视图。我试图使用arrayAdapter。我已经做字符串数组,但这个数组我的代码,我不能添加任何东西:如何在Android上向字符串数组添加元素String[] values;private final BroadcastReceiver mReceiver new Br…

网站如何做交换链接,如何优化关键词的方法,jsp做的网站效果,三亚网我正在尝试使用可用的蓝牙设备进行列表视图。我试图使用arrayAdapter。我已经做字符串数组,但这个数组我的代码,我不能添加任何东西:如何在Android上向字符串数组添加元素String[] values;private final BroadcastReceiver mReceiver new Br…

我正在尝试使用可用的蓝牙设备进行列表视图。我试图使用arrayAdapter。我已经做字符串数组,但这个数组我的代码,我不能添加任何东西:如何在Android上向字符串数组添加元素

String[] values;

private final BroadcastReceiver mReceiver = new BroadcastReceiver() {

public void onReceive(Context context, Intent intent) {

String action = intent.getAction();

// When discovery finds a device

if (BluetoothDevice.ACTION_FOUND.equals(action)) {

// Get the BluetoothDevice object from the Intent

BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

// Add the name and address to an array adapter to show in a ListView

values.add(device.getName() + "\n" + device.getAddress());

}

}

};

的Android工作室表示,它不能解析方法add和标记它。

整个代码:

c69a74e2dd43a4da7d7c49d2d0d0e9b4.png

如何解决这个问题,使这项工作?

谢谢。

+2

http://stackoverflow.com/questions/2843366/how-to-add-new-elements-to-数组 –