Inkognito Asked:2020-07-03 18:44:18 +0800 CST2020-07-03 18:44:18 +0800 CST 2020-07-03 18:44:18 +0800 CST 创建布尔数组[关闭] 772 如何创建一个长度等于我的回收器元素数量的布尔数组? android 2 个回答 Voted ЮрийСПб 2020-07-03T19:22:32+08:002020-07-03T19:22:32+08:00 好吧,就拿去创造: boolean[] boolArr = new boolean[recyclerView.getAdapter().getItemCount()]; Best Answer Barmaley 2020-07-04T16:20:19+08:002020-07-04T16:20:19+08:00 您还可以更经济地做到这一点: BitSet boolArr = new BitSet(recyclerView.getAdapter().getItemCount());
好吧,就拿去创造:
您还可以更经济地做到这一点: