java - Array to TextView -
i create simple method:
private void getcheckeditems() { int len = mgrid.getcount(); sparsebooleanarray checked = mgrid.getcheckeditempositions(); list <integer> numberlist = new arraylist<>(); (int = 0; < len; i++) if (checked.get(i)) { integer item = mnumber.get(i); numberlist.add(item); integer[] mnumberarray = numberlist.toarray(new integer[numberlist.size()]); log.d("played number: ", ""+ arrays.tostring(mnumberarray)); } }
with control method such elements selected grid , them return. split array put in textview
! how can do?
arrays.tostring(mnumberarray)
give string [2,3,45,67]
remove brackets [] , have string "2,3,45,67"
. can split string , string array. set each element of array each text view
Comments
Post a Comment