【发布时间】:2015-11-30 06:17:18
【问题描述】:
我已将 Roboto 字体作为资产包含在我的项目中。所以现在定义一个我可以做的 TextView
<me.android.fonts.widget.RobotoTextView
android:id="@+id/day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:typeface="roboto_bold"
android:textColor="@color/green_text"
android:textSize="@dimen/day_size"
tools:text="Tues"/>
现在图像我有一些需要样式的 TextView。通常,我可以简单地定义一个样式并重用它。但是由于app:typeface,在目前的情况下我无法做到这一点。如何将其包含在我的“style.xml”文件中?我已经试过了
<resources xmlns:app="http://schemas.android.com/apk/res-auto">
...
<style...>
...
</style>
</resources>
但这不起作用
【问题讨论】:
标签: android android-layout styles