Dynamic color change in xml?
I have a xml layout, i assigned color like android:textColor="#800080"; is there any way to change the color for this parameter dynamically while the app is running by use开发者_运维百科r input?
You can change text color of a view dynamically like this view.setTextColor(Color.parseColor("#234435"));
You can change text color of a view dynamically like this view.setTextColor(Color.rgb(255,0,0));
also view.setTextColor(Color.Red)
精彩评论