I want to change the check box button color when listview is enabled and other color when listview is disabled
Asked
Active
Viewed 668 times
0
-
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 Answers
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
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