1. There is a method for adding text shadow TextView to the code/*** Gives the text a shadow of the specified radius and color, the specified * 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 d X, float dy, int color) {mTextPaint. setShadowLayer (radius, dx, dy, color); mShadowRadius = radius; mShadowDx = dx; mShadowDy = dy; invalidate ();} mTextView. setShadowLayer (10F, 11F, 5F, Color. YELLOW); the first parameter is fuzzy, the greater the fuzzy. The second parameter is the x horizontal distance from the shadow text. The third parameter is the Y horizontal distance from the shadow text. The fourth parameter is the shadow color. (If the Blur is 0, the shadow effect is invisible.) The Button inherits TextView, so the Button can also use setShadowLayer (float radius, float dx, float dy, int color) in the code) method 2 Add text shadow 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" android: layout_alignParentLeft = "true" android: layout_marginBottom = "5.0dip" android: layout_marginLeft = "10.0dip" android: ShadowColor = "@ color/black" android: shadowDx = "0" android: shadowDy = "1" android: shadowRadius = "1" android: textColor = "@ color/white" android: textSize = "14sp"> </TextView> android: shadowColor shadow color android: horizontal offset of shadowDx shadow android: shadowDy shadow vertical offset android: shadowRadius shadow range Note: add the text shadow effect of the Button that does not see the shadowRadius when android: shadowRadius = 0 is the same as the above.