Add shadows to the bottom of the image

How to add a shadow above the image (bottom right) so that the title is clearly visible. See image below.

Image

+4
source share
2 answers

I wrote an application that has the same effect. What I did, I created a FrameLayout that has an ImageView and another View that has the same ImageView height. Then I add a transparent gradient background to the View .

Example:

Layout File:

<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:layout_width="match_parent" android:layout_height="180dp" android:src="@drawable/image" android:adjustViewBounds="true" /> <View android:layout_width="match_parent" android:layout_height="180dp" android:background="@drawable/gradient" /> </FrameLayout> 

hood /gradient.xml

 <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="90" android:endColor="#00ffffff" android:startColor="#aa000000" android:centerColor="#00ffffff" /> </shape> 

enter image description here

+18
source

You can use png image with gradient color and alpha, place it only at the bottom of the banner image. And the text of your name is in the image.

+1
source

All Articles