有没有人知道如何TextView在运行时设置样式:
这样的事情
myTextView.setStyle(R.style.mystyle);
Run Code Online (Sandbox Code Playgroud)
小智 25
使用setTextApparence和你的风格非常简单
myTextView.setTextAppearance(getApplicationContext(), R.style.boldText);
Run Code Online (Sandbox Code Playgroud)
您必须手动设置您更改的样式的每个元素,据我所知,无法在运行时设置样式。
myTextView.setTextAppearance
myTextView.setTextSize
myTextView.setTextColor
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
25708 次 |
| 最近记录: |