karthik kolanji
karthik kolanji

Reputation: 2104

RippleView effect on view appears late android

I am using com.andexert.library.RippleViewlibrary from Here's a link

Its working but not as expected . The ripple effect appears late i.e; when I click on TextView the Activity gets launched , then the ripple effect appears on the TextView of previous activity.

Also it shows error " cannot resolve method setOnRippleCompleteListener() "

xml file

<com.andexert.library.RippleView
        android:id="@+id/ripple_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        rv_centered="true"
        android:padding="0dp"
        android:layout_alignParentBottom="true">

    <com.techmorphosis.Utils.TextViewCustomFont
        android:id="@+id/txt_lets_go"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/white_text"
        android:background="@drawable/purple_button_bg"
        android:gravity="center"
        android:padding="10dp"
        android:text="@string/lets_go"
        android:textSize="@dimen/textsize_medium" />

    </com.andexert.library.RippleView>

java file

rippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {

           // @Override
            public void onComplete(RippleView rippleView) {
                Log.d("Sample", "Ripple completed");
            }

        });

Upvotes: 0

Views: 1253

Answers (1)

karthik kolanji
karthik kolanji

Reputation: 2104

I solved this by placing the view id's click event inside rippleView.setOnRippleCompleteListener

Eg :

rippleviewNavigation.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
                    @Override
                    public void onComplete(RippleView rippleView) {

if(id==R.id.txt_open){
// do stuffs here
}
}

Upvotes: 1

Related Questions