I finally found the problem I have to set the background first before setting the padding. Setting the padding then setting the background doesn't work // does not work tv.setPadding(20, 20, 20, 20); tv.setBackgroundResource(R.drawable.border); // wo
在同一个TextView里显示不同样式的字体 public void setSpan(Object what, int start, int end, int flags); 样式1:背景色.粗体.字体大小 效果 Code TextView textView = (TextView) findViewById(R.id.text_view_font_1); Spannable string = new SpannableString("修改背景色.粗体.字体大小"); // 背景色 s