高仿即刻侧滑阴影返回动画

自定义View 高仿即刻客户端侧滑回退动画

Gradle

1
2
3
4
dependencies {
...
implementation 'com.github.dabutaizha:SlideDampingAnimationLayout:v1.0.2'
}

Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
<slideDampongAnimationLayout.SlideDampingAnimationLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/search_result_slide_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:bezier_curves_color="@color/black"
app:bezier_curves_type="quadratic_bezier_curves"
app:allow_gesture="only_left">
<--content-->
</slideDampongAnimationLayout.SlideDampingAnimationLayout>

Code

1
2
3
4
5
6
7
8
9
mSlideAnimationLayout.setSlideListener(new SlideEventListener() {
@Override
public void leftEvent() {
}
@Override
public void rightEvent() {
}
});