开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜