I need to be able to do something like this:
if(condition){
textview.setStyle(R.styles.a1);
}else{
textview.setStyle(R.styles.a2);
}
the thing is you can't change the style at runtime, there is methods like setTextApperience and similar but not for setting the style. My question is how to set different backgrounds for the textview of some other view according to a theme, for example in themeA the color of the textview with id=tv1 is blue and for themeB the color of the textview with id=tv1 is red...
I know that this things are discussed on the forum but I couldn't find the thing I need
Edit1: I know that I can set a theme at runtime somebackground...
But my problem is how to set different backgorund for different theme for some specific element , let say element with id=textview1