I need to change the image programmatically setting an type of "darker". I need do that bacause the text view in the recycler view need to be in contrast with the background image.
How can I put this effect?
I need something like this
Asked
Active
Viewed 77 times
0

Antony Lajes
- 69
- 7
1 Answers
0
you can simply use a FrameLayout with 2 nested views inside, first add your ImageView and then add a view with gradient shape.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/dragon_ball_super" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shome_gradient_shape"/>
</FrameLayout>

Sep
- 147
- 8