Java 在Android中设置textView上的阴影不起作用
我试着在stack overflow和google上搜索,看看我是否犯了任何错误,但目前我还没有意识到我做了任何错误的事情。应用阴影层后,我看不出有任何区别。以下是我尝试过的:Java 在Android中设置textView上的阴影不起作用,java,android,textview,Java,Android,Textview,我试着在stack overflow和google上搜索,看看我是否犯了任何错误,但目前我还没有意识到我做了任何错误的事情。应用阴影层后,我看不出有任何区别。以下是我尝试过的: TextView textv = (TextView) findViewById(R.id.textview1); textv.setShadowLayer(1, 0, 0, Color.BLACK); textv.setShadowLayer(25, 0, 0, Color.BLACK); texttv.se
TextView textv = (TextView) findViewById(R.id.textview1);
textv.setShadowLayer(1, 0, 0, Color.BLACK);
textv.setShadowLayer(25, 0, 0, Color.BLACK);
texttv.setShadowLayer(1.5f, -1, 1, Color.LTGRAY);
有人知道问题出在哪里吗
我希望文本的字符周围有黑色边框,因为它显示在图像的顶部。使用
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="@color/White"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:textColor="@color/Black"
android:layout_width="wrap_content"
android:text="Soft Shadow"
android:layout_height="wrap_content"
android:padding="2dp"
android:shadowColor="@color/TransparentGrey"
android:shadowDx="3"
android:shadowDy="3"
android:shadowRadius="1.5" />
</LinearLayout>