Hi In the below code I am display textview with checkboxes.Now When I am selecting single value it's returning the name of the textview same as second textview name also.
Now I want to return at a time multiple textview names based on checkbox selected values. Eg:suppose two users I am selecting user1,user2 these two I got selected I want to return these two names in single variable.
java
checkBoxState = new boolean[friend.length];
holder.check1.setChecked(checkBoxState[position]);
holder.check1.setOnCheckedChangeListener(new OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
checkBoxState[position]=isChecked;
if(isChecked){
check=friend[position].userName;
}
Toast.makeText(getApplicationContext(),friend[position].userName+"checked", Toast.LENGTH_LONG).show();
}
});
Aucun commentaire:
Enregistrer un commentaire