As per my knowledge your you are not register Che
or ser
radiobutton, Eclipse not find xml defined Che
and ser
RadioButton value in java file. So you first register do following things,
Che= (RadioButton) findViewById(R.id.Che);
ser= (RadioButton) findViewById(R.id.ser);
after using above code you can try to run it's work perfect. also i put my own code using if else this is also work for you,
Now you can implement onCheckedChanged()
override method in following way,
@Override
public void onCheckedChanged(RadioGroup arg0, int arg1) {
if(arg1 == R.id.Che){
cutomfonts=getFirstFont();
myTextView.setTypeface(cutomfonts);
}else if(arg1 == R.id.ser){
cutomfonts=getSecondFont();
myTextView.setTypeface(cutomfonts);
}
}
Hope this help you!