Ajay Sivan
Ajay Sivan

Reputation: 2989

How to set the Ripple effect

I am working on an app which has a minSdkVersion = 16, and I need to use the ripple effect in Lollipop and above and some other effect on lower version.
Is there any way to do this using XML?

Upvotes: 0

Views: 284

Answers (3)

Milan Pansuriya
Milan Pansuriya

Reputation: 2559

No need to design any other layout just for specific version just Use this library for ripple effect

https://github.com/traex/RippleEffect

compile line for this library

dependencies {
compile 'com.github.traex.rippleeffect:library:1.3'

}

Upvotes: 5

Max Zavernutiy
Max Zavernutiy

Reputation: 1879

You can create different XML files for pre-Lollipop and Lollipop or higher enter image description here

Upvotes: 1

Cliff
Cliff

Reputation: 713

You can use Material Design on pre lollipop Devices. You need to add in your gradle this :

compile 'com.android.support:appcompat-v7:23.2.1'

Read the reference on Google blog link

Upvotes: 1

Related Questions