Reputation: 1173
In a layout like the following :
<RelativeLayout
android:padding="5dp"
... >
<Button
android:alignParentBottom="true"
android:elevation="2dp" />
</RelativeLayout>
The shadow of the Button
is not shown because it is "behind" the padding of the parent.
In other words the Button
does not automatically takes into consideration its elevation to add some space between itself and the parent's bottom.
How can I make it work ?
Set an additional margin for this button to be sure that elevation's shadow will be show properly ?
Thanks for you help.
Upvotes: 2
Views: 3046
Reputation: 13029
You can add android:clipToPadding="false"
on the parent RelativeLayout
.
This will make the parent not clipping it's child view drawing inside his own bounds.
Upvotes: 12