i using listview effientadapter.
in effiicient adapter initialized , arraylist
public static arraylist<string> stringposition = new arraylist<string>();
and populate using position in arraylist 1 , 2.
stringposition.add(position);
then in listview activity in onintemclicklister check if values stored match position. when click of more 1 stored value in arraylist. last item in arraylist. how can
comparing string values arraylist , check if match.
for (int i=0;i<efficientadapter.stringposition.size();i++){ string x = efficientadapter.stringposition.get(i).tostring(); system.out.println("x: " +x); if (x.equals(string.valueof(position))) detailwork.green_or_blue=1; else detailwork.green_or_blue=0; }
how can solved issue , best way compare if element of listrows identical list position. ?
i can't edit comment anymore...
for choice_mode_multiple
use
sparsebooleanarray sba = listview.getcheckeditempositions();
for choice_mode_single
use int pos = listview.getselecteditemposition();
you can later fetch these positions adapter.
Comments
Post a Comment