[Solved] How to set the text_selector at the run time


put your selector under res/drawable and use

label.setTextColor(getResources().getColorStateList(R.drawable.text_selector));

don’t forget to set android:clickable="true" in the declaration of your TextView in the layout

3

solved How to set the text_selector at the run time