traex / RippleEffect

Implementation of Ripple effect from Material Design for Android API 9+
MIT License
4.92k stars 1.08k forks source link

set ripple fullscreen color and alpha #125

Open ntaloventi opened 7 years ago

ntaloventi commented 7 years ago

I have implement ripple with floating action button, works perfectly, but if I want to expand ripple to match screen size and set color to custom color then its only fire by tap on button, if I set layout RippleView to match_parent, ripple goes wider but how to prevent ripple if tap from outside? how could I achieve this?

<com.andexert.library.RippleView android:id="@+id/ripple" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" rv_centered="true" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_marginBottom="10dp" android:layout_marginRight="10dp" android:layout_marginEnd="10dp"> <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" app:srcCompat="@mipmap/ic_add_black_36dp" android:id="@+id/fabMenu" app:fabSize="normal" app:backgroundTint="@color/colorPrimary" android:tint="@color/white" app:elevation="5dp" /> </com.andexert.library.RippleView>

Thanks