Skip to content
自定义View 高仿即刻客户端侧滑回退动画控件
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

SlideDampingAnimationLayout

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

Gradle

dependencies {
    ...
    implementation 'com.github.dabutaizha:SlideDampingAnimationLayout:v1.0.2'
}

Usage

<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

mSlideAnimationLayout.setSlideListener(new SlideEventListener() {
            @Override
            public void leftEvent() {
            }

            @Override
            public void rightEvent() {
            }
        });

原即刻APP效果

“pic0”/

仿写效果(分为两种 三个控制点贝塞尔曲线和六个控制点绘制的贝塞尔曲线 下图为仿即刻的效果)

“pic2”/

已实现功能

  • 继承FrameLayout 可以左右滑动触发动画与事件
  • 可配置是否只触发单一方向动画与事件
  • 可配置颜色
  • 可选择两种样式的贝塞尔曲线

Who used

juzimi

You can’t perform that action at this time.