[問題] 有關於Arraylist拿不到值
我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,
不過在 其他地方 要拿來用,
就拿不到mDevices1就為空的陣列
存不回去上面宣告的mDevices1那
我想問看看有什麼關鍵字!
現在完全沒有方向...
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.225.162.37
※ 文章網址: https://www.ptt.cc/bbs/java/M.1451281438.A.6CB.html
→
12/28 20:20, , 1F
12/28 20:20, 1F
→
12/28 21:15, , 2F
12/28 21:15, 2F
※ 編輯: freedom74569 (61.230.74.188), 12/28/2015 21:15:36
推
12/28 21:22, , 3F
12/28 21:22, 3F
→
12/28 22:27, , 4F
12/28 22:27, 4F
→
12/28 22:53, , 5F
12/28 22:53, 5F
→
12/28 22:58, , 6F
12/28 22:58, 6F
→
12/28 23:59, , 7F
12/28 23:59, 7F
→
12/29 00:01, , 8F
12/29 00:01, 8F
推
12/29 10:44, , 9F
12/29 10:44, 9F
→
12/29 23:43, , 10F
12/29 23:43, 10F
java 近期熱門文章
PTT數位生活區 即時熱門文章