You are trying to say you want to hide the checkbox on previously
clicked item  and then show it on the currently clicked item? You can
edit it with the getView() method or do something like this


private class UI extends AsyncTask <View, String, View>
 {
         public View viewItem=null;
         public UI(View v)
         {
                 this.viewItem=v;
         }
        @Override
        protected View doInBackground(View... arg0) {

                return viewItem;
        }

        @Override
        protected void onPreExecute() {

                for(int i = 0; i  <= listView.getLastVisiblePosition(); i++)
                {
                        if(listView.getChildAt(i)!= null)
                        {
        
(listView.getChildAt(i).findViewById(R.id.yourcheckbox)).setVisibility(View.GONE);


                        }
                }

                super.onPreExecute();
        }

        @Override
        protected void onPostExecute(View result) {

        
((CheckBox)result.findViewById(R.id.yourcheckbox)).setVisibility(View.VISIBLE);
               //or change the state of the checkbox, your call :)
                super.onPostExecute(result);
        }

 }

Remember, you can modify your userinterface only from UI thread. So
implementing AsyncTask you should do the modification in
onPreExecute()  or in onPostExecute() methods. In your case in
onPreExecute you do hiding on the previous items view child and in
oPostExecute you do showing....

I hope this is what you are looking for.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to