Skip to content

Instantly share code, notes, and snippets.

@maiconhellmann
Created November 21, 2017 16:37
Show Gist options
  • Save maiconhellmann/67f77d9e0512883c55f4663f1e869962 to your computer and use it in GitHub Desktop.
Save maiconhellmann/67f77d9e0512883c55f4663f1e869962 to your computer and use it in GitHub Desktop.
Ripple effect example
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools">
<android.support.v7.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="3dp"
android:layout_margin="4dp"
card_view:cardBackgroundColor="@android:color/white"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground">
<!-- TODO -->
</android.support.v7.widget.CardView>
</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment