Skip to content

Instantly share code, notes, and snippets.

@shem8
Created January 21, 2016 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shem8/3890f6769f572efd2482 to your computer and use it in GitHub Desktop.
Save shem8/3890f6769f572efd2482 to your computer and use it in GitHub Desktop.
Layout:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/processed_image_background">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/image_selector"
android:clickable="true" />
</FrameLayout>
image_selector.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/processed_image_original" />
<item android:state_selected="true" android:drawable="@drawable/processed_image_original" />
<item android:drawable="@drawable/processed_image" />
</selector>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment