It is a lib for using singleClickListener and PushDown Anim Together
maven { url 'https://jitpack.io' }
implementation 'com.github.tareq3:PushDown_ExtSingleClick:2.0.0'
SingleClick.get(findViewById(R.id.mButton)).setOnSingleClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "Clicked ", Toast.LENGTH_SHORT).show();
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); //for onclick vibration
}
});
How to Use SingleclikListener with push-anim by Thai android developer.=> push down animation click
//Todo: With Anim Single Click Listener
PushDownAnim.setPushDownAnimTo(findViewById(R.id.mButton)).setOnSingleClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "Clicked ", Toast.LENGTH_SHORT).show();
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); //for onclick vibration
}
});
For more push Animation Docs please visit HERE .
Creadit: I used push down animation click library by Thai Android developer as a base for development.