Hinzufügen Schatten auf CardView ausgerichtet nach unten von Elternteil
Ich habe eine CardView ausgerichtet unteren Bildschirm, destpite die Höhe möchte ich hinzufügen, mehr Schatten auf der Oberseite der CardView. Ich habe versucht mit
android:shadowColor="#000"
android:shadowDx="0"
android:shadowDy="30"
android:shadowRadius="50"
Aber sehe keine änderungen, das ist mein code:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:clipToPadding="false"
android:clipChildren="false"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--rest of the code-->
<LinearLayout
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:shadowColor="#000"
android:shadowDx="0"
android:shadowDy="30"
android:shadowRadius="50"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="8dp"
android:divider="@android:color/transparent"
android:dividerHeight="0.0px"
android:clipToPadding="false"
android:clipChildren="false"
app:cardElevation="10dp"
app:cardPreventCornerOverlap="false">
<!--rest of the code-->
</android.support.v7.widget.CardView>
</LinearLayout>
</RelativeLayout>
InformationsquelleAutor Merian | 2017-01-12
Du musst angemeldet sein, um einen Kommentar abzugeben.
Gut-Marge nicht viel helfen, also habe ich padding auf der main container, und entfernen Sie alle Schatten-Eigenschaften, da die
android:elevation=""
ist, was die Arbeit zu machen.Hier einige, klaren code, dass ist die Arbeit für diese Notwendigkeit:
Sowie ein Bild, wie das aussieht:
InformationsquelleAutor Merian
Hinzufügen einer Marge um die Ansicht, die einen Schatten helfen könnte.
InformationsquelleAutor Frank
Durch hinzufügen Rand der Karte Anzeigen
InformationsquelleAutor Mujammil Ahamed