在xml中,您可以在TextView中将文本的左侧,右侧,底部或顶部设置为drawable.有没有办法通过代码设置/更改此drawable?
Ram*_*ran 63
TextView textView = (TextView)findViewById(R.id.myTxtView);
textView.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.icon, //left
0, //top
0, //right
0);//bottom
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14835 次 |
| 最近记录: |