I want my toggle button’s ON text to be large and OFF text to be small. But can’t do it.. any suggestions? This is what i was trying
mf=(ToggleButton)findViewById(R.id.mf);
if(mf.isEnabled()==true)
{
mf.setTextSize(13);
}
else
mf.setTextSize(8);
Your code has to be called each time you click on your button. so use :
You can set OnClickListner with a easy method. In your .xml put the option
And then in your code:
Where v is the togglebutton in this case ( ToggleButton mf = (ToggleButton)v; )