Skip to content

Instantly share code, notes, and snippets.

@arvkmr
Created December 1, 2017 22:12
Show Gist options
  • Save arvkmr/320bb0babc53bd0a4bdd33dfd5cc53e3 to your computer and use it in GitHub Desktop.
Save arvkmr/320bb0babc53bd0a4bdd33dfd5cc53e3 to your computer and use it in GitHub Desktop.
Transparent gradient that from top to bottom of image android
<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" />
<corners android:radius="0dp" />
</shape>
// set this file as src and image as background on imageview.
@mohitkumarsoni
Copy link

👍👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment