ยท 1 min read

Different kinds of Ripple

The regular Ripple

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#f00">
    <item android:id="@android:id/mask">
        <color android:color="#ff0000ff" />
    </item>
</ripple>

The borderless Ripple

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#f00">
</ripple>

The semi-transparent Ripple

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#f00">
    <item android:id="@android:id/mask">
        <color android:color="#8000ffff" />
    </item>
</ripple>

The completely transparent Ripple (hint: not super useful)

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#f00">
    <item android:id="@android:id/mask">
        <color android:color="#0000ffff" />
    </item>
</ripple>

By Martin Bonnin on May 29, 2017.

Canonical link

Exported from Medium on November 9, 2024.

    Share:
    Back to Blog