Skip to content

Instantly share code, notes, and snippets.

@jie-meng
Created October 11, 2017 14:50
Show Gist options
  • Save jie-meng/13c28725918753d1e0c3c6476112d2aa to your computer and use it in GitHub Desktop.
Save jie-meng/13c28725918753d1e0c3c6476112d2aa to your computer and use it in GitHub Desktop.
Add water ripple to Button
<Button
android:id="@+id/btn_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/dark_blue"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:textAllCaps="false"
android:textSize="@dimen/textsize_button"
android:textColor="@android:color/white"
android:text="@string/next"/>
@hoseinit
Copy link

It doesn't work for me
how should I add ripple effect when the button has already background color?
I don't want to make style.xml for every button I have.
what is a generic way like yours but working one?
thanks
@jie-meng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment