Skip to content

一个随滑动显示隐藏的自定义View,类似知乎回答详情页。适用于任何页面,可自定义in/out动画。

Notifications You must be signed in to change notification settings

Blankeer/ScrollHideView

Repository files navigation

参考

https://github.com/shamanland/floating-action-button

#截图 image

使用

Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}
Step 2. Add the dependency
	dependencies {
	        compile 'com.github.Blankeer:ScrollHideView:V0.1'
	}
<com.blanke.lib.scrollholdview.ScrollHideView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_margin="5dp"
        android:id="@+id/hideView"
        app:animIn="@anim/in"
        app:animOut="@anim/out"
        app:targetView="@id/recyclerview">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/colorPrimary"
            android:gravity="center"
            android:padding="30dp"
            android:text="this is a test TextView!"
            android:textColor="#fff"
            android:textSize="20sp" />
    </com.blanke.lib.scrollholdview.ScrollHideView>

animIn:进入动画

animOut:离开动画

targetView:目标View,也就是观察源,监听这个控件的滑动状态,可任意View

About

一个随滑动显示隐藏的自定义View,类似知乎回答详情页。适用于任何页面,可自定义in/out动画。

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages