シンプルなxml-layoutがあります:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:padding="5dp" >
<Button
android:padding="15dp"
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:shadowColor="@android:color/black"
android:shadowDy="10"
android:shadowRadius="5"
android:text="Button" />
</LinearLayout>
これをアクティビティのコンテンツ ビューとして設定すると、ボタンのテキストの下に黒い影が表示されます。しかし、変更android:shadowColor="@android:color/black"
するとandroid:shadowColor="@android:color/white"
、影がなくなります。なんで?