Friday, March 23, 2012

How to apply shadow to a view in android?


How to apply shadow to a view in android?

This is a simple example showing how to create a shadow for a textView in android.
?
Drag and copy the code
01
02
03
04
05
06
07
08
09
10
11
12
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="CoderzHeaven"
        android:textColor="#FF0000"
        android:shadowColor="#008000"
        android:shadowRadius="1.5"
        android:shadowDx="2"
        android:shadowDy="5"
        android:textSize="35sp"
        android:gravity="center"
    />
shadow in view
TextView shadow in android

No comments: