Android:在TextView上设置阴影不起作用

Android:在TextView上设置阴影不起作用,android,android-layout,textview,Android,Android Layout,Textview,我试图通过编程在textview上获得阴影或光泽效果: 我的布局: ... <LinearLayout android:id="@+id/myll" android:layout_width="fill_parent" android:layout_height="40dp" android:background="@drawable/myblackimage" android:gravity="lef

我试图通过编程在textview上获得阴影或光泽效果:

我的布局:

...
    <LinearLayout
        android:id="@+id/myll"
        android:layout_width="fill_parent"
        android:layout_height="40dp"
        android:background="@drawable/myblackimage"
        android:gravity="left|center_vertical"
        android:orientation="horizontal" >

        <TextView
            android:id="@+id/tvShadowy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="10dp"
            android:text="Shadowy Text"
            android:textAppearance="@android:style/TextAppearance.Medium"
            android:textColor="#FFFFFF" />
...
但什么也没发生……没有出现红色阴影。 虽然..设置文本颜色等工作
我也删除了父linearlayout的背景图像。。但没有效果

试试这个tvshadowlayerfloat 3,1,1,Color.RED;当然,你想要的参数!我想你错过了花车?!奇怪,它对我有用。你能发布更多的代码吗?谢谢Maheera>我切换到:tvshadowlayer0.01f,-2,2,Color.RED;这起作用了。我想如果我使用非常大的半径值。。效果不明显。。。
...
 tvShadowy.setShadowLayer(30, -5, 10, Color.RED);