2016-11-12 70 views
-2

我已經搜索周圍,但找不到一些有用的教程來裝飾在android layout xml textview,很少有人不裝飾以及。Android:文本視圖裝飾

我知道了一些事情:

  1. android:shadowColor
  2. android:shadowDx
  3. android:shadowDy
  4. android:shadowRadius
  5. android:textAppearance
  6. android:textStyle
  7. android:typeface
  8. android:textColorHighlight
  9. android:textColor

按我的理解,我們可以使用上面attributest裝飾文本視圖看起來更具吸引力。但我不知道如何使用。我是Android新手,如果我錯了,請糾正我。

感謝

+0

伊蘇這些是用來美化TextView的文本。你想知道什麼 ? –

+0

你試過這個github的例子https://github.com/hanks-zyh/HTextView? –

+0

@Preetika是正好美化文字。你可以給任何可能的以上屬性值的組合值,看起來不錯,我可以根據我的要求更改值。 –

回答

2

嘗試Shadow effect

   <TextView android:id="@+id/txt_example1" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textSize="14sp" 
        android:textStyle="bold" 
        android:textColor="@color/light_font" 
        android:shadowColor="@color/text_shadow" 
        android:shadowDx="1" 
        android:shadowDy="1" 
        android:shadowRadius="2" />