I have a situation where I want to add an image view doing the same effect as this app
As you notice there is a drawable or something hiding the bottom side of the view adding a transparent gradient. How can I achieve the same effect?
setAlpha(51); Here you can set the opacity between 0 (fully transparent) to 255 (completely opaque). The 51 is exactly the 20% you want.
For all the Android and iPhone users out there, Apowersoft Background Eraser is the app that can create white background to transparent. This app will automatically get rid background with zero taps. No doubt that you will get a genuine all-in-one photo background editor. Download and install the app on your phone.
If you add this line to the Constraint Layout xml it will become transparent: android:background="@android:color/transparent" . This will make the background see through and show what ever is bellow or overlapping.
Well, you can use fadingEdge attribute of the listView in your xml. Make a listView, then add items xml (images in particular as you've mentioned above).
android:fadingEdge="horizontal"
android:fadingEdgeLength="30dp"
android:fillViewport="false"
android:requiresFadingEdge="vertical"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With