0
由于可用动画,我想使用TextSwitcher
而不是TextView
,但有人知道如何使用自定义Typeface
作为文本?我不想使用默认字体。使用带自定义字体的TextSwitcher
由于可用动画,我想使用TextSwitcher
而不是TextView
,但有人知道如何使用自定义Typeface
作为文本?我不想使用默认字体。使用带自定义字体的TextSwitcher
只需使用android:fontFamily
属性为每个孩子TextView
。
<TextSwitcher . . .>
<TextView
android:fontFamily="..."
. . . />
<TextView
android:fontFamily="..."
. . . />
</TextSwitcher>
的TextSwitcher
将两个孩子TextView
之间交替,使用字体家族(字体)指定。
这适用于'TextSwitcher.setText'? – pqn
@PremN。 - 这应该。一个'TextSwitcher'将在两个'TextView'子节点之间切换。 –
工作!谢谢! – pqn