The blue bordered part is a LinearLayout
and the white card part is the background image I have used. The background image is not filling the layout.
I have tried keeping an ImageView
in a FrameLayout
and making scale type as centerCrop but even that didn't work. I can use a CardView
instead but I want this type of shadow as shown in the picture which I couldn't achieve with attributes of CardView
.
Here is my code:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/squared_background_shadow">
</LinearLayout>
LinearLayout
, which don't support by CardView
? android:scaleType="fitXY"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.