lundi 19 octobre 2015

Issue Setting ALL Checkboxes Visible

I am trying to make the checkbox in all rows of my listview VISIBLE on LongPress. So far I have had a little success, but no matter what row I click, it only makes the first row visible.

Can anyone tell me how to make all rows checkbox visible? Here is my code:

lvMsgList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
        @Override
        public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
            chkItem = (CheckBox)rootView.findViewById(R.id.phlvcheck);
            chkItem.setVisibility(View.VISIBLE);
            chkItem.setChecked(true);
            return true;
        }
    });




Aucun commentaire:

Enregistrer un commentaire