.net

.net

博客园 首页 新随笔 联系 订阅 管理
<style name="text_style">
<item name="android:textStyle">bold</item>
<item name="android:textSize">18sp</item>
</style>
xml使用:
<TextView
style="@style/button_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
</TextView>
java代码使用:
TextView txtname = new TextView(this);
txtname.setTextAppearance(this, R.style.text_style);
posted on 2018-06-15 15:22  航宇  阅读(10209)  评论(0编辑  收藏  举报