2011-11-18 20 views

回答

5

如果你想讓它在XML佈局設置,則使用:

<TextView 
... 
... 
android:textColor="#FF0000" > 
</TextView> 

如果你想設置程序,然後使用:

textview.setTextColor(Color.RED); 
//textview must be defined in your class 
0

在佈局中使用此:

<TextView> 
    .... 
    textColor="red" 
    .... 
</TextView> 
1

要更改使用您的xml以下將顏色改爲紅色,並使用其他顏色的六角代碼可以更改爲任何其他顏色。這是將顏色設置爲紅色的示例:

android:textColor="#FF0000" 
+0

對不起,問題已解決 – tiranodev

相關問題