1 adding text shadows to your code
TextView has a method/** * Gives The text a shadow of the specified radius and color, the specified &nbs P * distance from its normal position. * * @attr ref Android. r.styleable#textview_shadowcolor * @attr ref Android. r.styleable#textview_shadowdx * @attr ref Android. r.styleable#textview_shadowdy * @attr ref Android. r.styleable#textview_shadowradius */ public void Setshadowlayer (float radius, float dx, float dy, int color) { mtextpaint.setshadowlayer (radius, dx, dy, color); &NB Sp Mshadowradius = radius; MSHADOWDX = dx; Mshadowdy = dy; invalidate (); }mtextview.setshadowlayer (10F, 11f,5f, Color.yellow); The first parameter is a blur, and the larger the more blurred. The second parameter is the x transverse distance of the shadow leaving the text. The third parameter is the Y-lateral distance of the shadow from the text. The fourth parameter is a shadow color. (If the blur level is 0, the shadow effect is not visible.)The button is inherited TextView, so the button can also use Setshadowlayer (float radius, float dx, float dy, int color) method 2 in the code to add text shadows to the configuration file < textview android:id= "@+id/name" Android: Layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_above= "@+id/person_popularvalue" and nbsp Android:layout_alignparentleft= "true" android:layout_marginbottom= "5.0dip" android:layout_marginleft= "10.0dip" and Roid:shadowcolor= "@color/black" android:shadowdx= "0" android:shadowdy= "1" android:shadowradius= "1" android:textcolor= "@color/wHite " android:textsize=" 14SP "> </textview>android:shadowcolor The shadow's color android:shadowdx the horizontal offset of the shadow android:shadowdy the vertical offset of the shadow Android:shadowradius the extent of the shadow that needs attention: will Android:shadowradius=0 When you do not see the shadow of the button's text shadow effect is added as above.
Add a shadow effect to TextView or button text in Android