New UI-shadow TextView and ui-textview
New UI-shadow TextView
-- Reprinted please indicate the source: coder-pig. You are welcome to repost it. Please do not use it for commercial purposes!
The piggy Android development and exchange group has been established. You are welcome to join us. You can be a newbie, cainiao, or a great god.
After all, the power is limited. There will certainly be a lot of flaws in writing. You are welcome to point out, brainstorm, And let pig's blog post.
For more details, help more people, O (∩ _ ∩) O thank you!
Piggy Android Development Exchange Group:Piggy Android Development GroupGroup Number:421858269
New Android UI instance catalog:Http://blog.csdn.net/coder_pig/article/details/42145907
This section introduces:
This section describes how to set a shadow effect for TextView text ~
In addition, the shadow effect is not displayed on the ADT. You need to run it to see it!
Body of this section:
The core is the following attributes:
Android: textColor: set text color
Android: shadowColor: Set the shadowColor, which must be used with shadowRadius!
Android: shadowRadius: sets the Blur degree of the Shadow. If it is set to 0.1, the font color is changed. We recommend that you use 3.0.
Android: shadowDx: sets the offset of the shadow in the horizontal direction, which is the abscissa position starting from the shadow in the horizontal direction.
Android: shadowDy: sets the offset of the shadow in the vertical direction, which is the ordinate position starting from the shadow in the vertical direction.
Code Demonstration:
<RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" android: layout_width = "match_parent" android: layout_height = "match_parent" tools: context = "com. jay. example. test. mainActivity "> <TextView android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: layout_centerInParent =" true "android: shadowColor =" # F9F900 "android: shadowDx = "10.0" android: shadowDy = "10.0" android: shadowRadius = "3.0" android: text = "shadow TextView" android: textColor = "# 4A4AFF" android: textSize = "30sp"/> </RelativeLayout>
Run:
Okay. You can set the shadow effect for TextView here ~