android - How to update Activity UI based on ListView item selection? -


i creating sample application containing activity [having listview , button] in layout file. listview custom containing [label/name , checkbox]. want write code change text of button adapter class of listview based on list item checkbox check [t/f].

     listview.setonitemclicklistener(new onitemclicklistener()             {                 public void onitemclick(adapterview<?> parent, view view, int position, long id)                 {                     // when clicked, show toast textview text                     applistofallapps selecteditems = (applistofallapps) parent.getitematposition(position);                     if (view != null)                     {                         checkbox checkbox = (checkbox) view.findviewbyid(r.id.checkbox1);                         selecteditems = (applistofallapps) checkbox.gettag();                         //here selected item may text accordingly , using using button variable set text button.settext("whatever");                     }                 }             }); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -