You can show the touch ripple effect on Android ImageView easily. This is basically ImageView enabled the foreground especially for a hover effect, which also supports RippleDrawable from API21.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
library
screenshot
.gitignore
LICENSE
README.md
RippleVisibleImageView.iml
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

RippleVisibleImageView

Release

You can show the touch ripple effect on Android ImageView easily. This is basically ImageView enabled the foreground especially for a hover effect, which also supports RippleDrawable from API21. You can also use this for masking an image with a frame image.

ScreenShot

sreenshot

Usage (XML)

Use just android:foreground attribute for a drawable to show over ImageView.

    <com.genxhippies.library.RippleVisibleImageView
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:scaleType="centerCrop"
        android:src="@drawable/newyork"
        android:foreground="@drawable/touch_overlay"
        android:clickable="true" />

Usage (Java)

You can use this with your code of course.

    RippleVisibleImageView imageView = findViewById(R.id.image_view);
    imageView.setForegroundResource(R.drawable.touch_overlay);

Import

Project build.gradle

repositories {
    maven {
        url "https://jitpack.io"
    }
}

Module build.gradle

dependencies {
	   compile 'com.github.inkyfox:RippleVisibleImageView:1.0.0'
}

LICENSE

LICENSE UNDER MIT