[問題] 有關於拿不到Arraylist的問題
https://www.ptt.cc/bbs/AndroidDev/M.1451090467.A.79A.html
這是上次的問題,
我有抓到問題了,
我implements library然後使用裡面的fuction
//宣告ArrayList mDevices1
public ArrayList<BluetoothDevice> mDevices1 = new ArrayList<BluetoothDevice>();
//使用library function,還是這裡會做在library package裡面,這樣讓我取不到?
@Override
public void bluetoothDeviceListBeenRenewed(BluetoothList bluetoothList) {
//mDevices1 = bluetoothList;
mDevices1.addAll(bluetoothList);
// 這裡打印的出來mDevices01,而且bluelist確定有東西也有打印出來
Log.e("mDevices1", String.valueOf(mLeDevices1));
}
我只有在這個function印得出來mDevices1,
不過在如onCreate or 其他地方要拿來用,
就拿不到mDevices1就為空的陣列
存不回去上面宣告的mDevices1那
我想問看看有什麼關鍵字!
現在完全沒有方向...
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.225.162.37
※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1451278751.A.EFE.html
推
12/28 13:24, , 1F
12/28 13:24, 1F
→
12/28 13:25, , 2F
12/28 13:25, 2F
→
12/28 13:26, , 3F
12/28 13:26, 3F
→
12/28 13:26, , 4F
12/28 13:26, 4F
推
12/28 13:51, , 5F
12/28 13:51, 5F
→
12/28 13:51, , 6F
12/28 13:51, 6F
→
12/28 14:48, , 7F
12/28 14:48, 7F
→
12/28 14:49, , 8F
12/28 14:49, 8F
→
12/28 14:50, , 9F
12/28 14:50, 9F
推
12/28 15:27, , 10F
12/28 15:27, 10F
→
12/28 15:28, , 11F
12/28 15:28, 11F
推
12/28 15:33, , 12F
12/28 15:33, 12F
→
12/28 15:59, , 13F
12/28 15:59, 13F
※ 編輯: freedom74569 (36.225.162.37), 12/28/2015 16:00:24
推
12/28 22:40, , 14F
12/28 22:40, 14F
→
12/28 22:40, , 15F
12/28 22:40, 15F
→
12/28 23:48, , 16F
12/28 23:48, 16F
→
12/28 23:48, , 17F
12/28 23:48, 17F
推
12/29 08:43, , 18F
12/29 08:43, 18F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):