2012-07-01 42 views

回答

5

只需使用android:fontFamily属性为每个孩子TextView

<TextSwitcher . . .> 
    <TextView 
     android:fontFamily="..." 
     . . . /> 

    <TextView 
     android:fontFamily="..." 
     . . . /> 

</TextSwitcher> 

TextSwitcher将两个孩子TextView之间交替,使用字体家族(字体)指定。

+0

这适用于'TextSwitcher.setText'? – pqn

+0

@PremN。 - 这应该。一个'TextSwitcher'将在两个'TextView'子节点之间切换。 –

+0

工作!谢谢! – pqn