Search code examples
androidripple

How do i do this special ripple effect in buttons?


I saw a special ripple effect in an app, i want to do it, too now. I attached a video to this ripple effect.

Any ideas or suggestions how I can do this?


Solution

  • You can use library for that And wrap your view inside it

    <com.andexert.library.RippleView
      android:id="@+id/more"
      android:layout_width="?android:actionBarSize"
      android:layout_height="?android:actionBarSize"
      android:layout_toLeftOf="@+id/more2"
      android:layout_margin="5dp"
      rv_centered="true">
    
      <ImageView
        android:layout_width="?android:actionBarSize"
        android:layout_height="?android:actionBarSize"
        android:src="@android:drawable/ic_menu_edit"
        android:layout_centerInParent="true"
        android:padding="10dp"
        android:background="@android:color/holo_blue_dark"/>
    
    </com.andexert.library.RippleView>