Shadow beneath Android TextView -
i've been trying add shadow effect beneath textview, reason, it's not working! layout xml given below. can please find out reason that?
<textview android:id="@+id/textview1" android:text="hello world!" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:background="@drawable/myshape" android:shadowcolor="#ff0000" android:shadowradius="3" android:shadowdx="2" android:shadowdy="2" android:gravity="center" android:textappearance="?android:attr/textappearancemedium" />
myshape drawable:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > android:shape=["rectangle"] > <stroke android:width="2dp" android:color="#ffffffff" /> <gradient android:endcolor="#ddbbbbbb" android:startcolor="#dd777777" android:angle="90" /> <corners android:bottomrightradius="15dp" android:bottomleftradius="15dp" android:topleftradius="15dp" android:toprightradius="15dp" /> </shape>
Comments
Post a Comment