balysv / material-ripple

Android L Ripple effect wrapper for Views
Apache License 2.0
2.36k stars 479 forks source link

delay in taking action at the end of timing #88

Open volkanciloglu opened 5 years ago

volkanciloglu commented 5 years ago

I have a button and when I clicked it goes to another activity. I entered the time value in this button for example app: I used mrl_rippleDuration. But it doesn't take action for about 1 second after the animation ends.

my xml :

<com.balysv.materialripple.MaterialRippleLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:mrl_rippleBackground="@color/colorRed"
            app:mrl_rippleDuration="200">
   <Button
                android:id="@+id/other_activity"
                android:layout_width="350dp"
                android:layout_height="wrap_content"
                android:background="@color/transparent"/>
</com.balysv.materialripple.MaterialRippleLayout>

activity Class

     btn_other_activity = findViewById(R.id.other_activity);
     btn_other_activity.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(context, OtherActivity.class);
                startActivity(intent);
            }
        });