0

I want to change the check box button color when listview is enabled and other color when listview is disabled

user
  • 1,979
  • 4
  • 18
  • 18
  • Just to clarify, you mean when a `ListView` _item_ is enabled/disabled, correct? – Mike P. Oct 10 '13 at 05:08
  • i'm having a check box on top.If the check box is checked the listview is enabled.At that time i need t give a color for textview in listview – user Oct 10 '13 at 05:11

2 Answers2

0

Check this answer. May be it will help you

Gmail-like ListView with checkboxes (and using the ActionBar)

or just check this listView+checkbox

Community
  • 1
  • 1
Ameer
  • 2,709
  • 1
  • 28
  • 44
0
CheckBox repeatChkBx = ( CheckBox ) findViewById( R.id.repeat_checkbox );

ListView lst = ( ListView ) findViewById( R.id.repeat_lst );

repeatChkBx.setOnCheckedChangeListener(new OnCheckedChangeListener(){


 public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
    {

         if ( isChecked )
        {

            lst.setClickable(true);

        }
        else
         {
            lst.setClickable(true);
        }

    }
});
Sunil Kumar
  • 7,086
  • 4
  • 32
  • 50
Sino
  • 886
  • 7
  • 21