【发布时间】:2013-07-09 10:44:39
【问题描述】:
有没有办法以编程方式更改小部件中文本视图的字体系列?我只想使用系统字体(Roboto Thin、Condensed 等),而不是任何自定义字体。
【问题讨论】:
标签: android android-layout android-widget
有没有办法以编程方式更改小部件中文本视图的字体系列?我只想使用系统字体(Roboto Thin、Condensed 等),而不是任何自定义字体。
【问题讨论】:
标签: android android-layout android-widget
是的,你可以使用 RoboFont 的库,下面是我如何将库用于 textview 的示例。
<com.eevoskos.robotoviews.widget.RobotoTextView
android:layout_weight="1"
android:background="@color/table_row_header"
android:gravity="center"
android:padding="@dimen/table_row_header"
android:text="Product"
app:typeface="condensed_bold" />
【讨论】: