Skip to content
Pull/Drawer/Layer 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.
app
curtainview Clean Start Dec 13, 2017
gradle/wrapper Clean start Dec 12, 2017
imgs Clean Start Dec 14, 2017
.gitignore Clean start Dec 12, 2017
LICENCE Clean start Dec 12, 2017
README.md Update README.md Jan 23, 2019
build.gradle Clean Start Dec 13, 2017
gradle.properties Clean start Dec 12, 2017
gradlew Clean start Dec 12, 2017
gradlew.bat Clean start Dec 12, 2017
settings.gradle Clean start Dec 13, 2017

README.md

CurtainView

license
Android Arsenal

Like DrawerLayout , but can layer both horizontally and vertically .

image

image

Download

Add the library to your module's build.gradle:

dependencies {
  implementation 'org.aicaprio:curtainview:1.0.1'
}

Usage

Just few configs :

<org.aicaprio.curtainview.CurtainView
    xmlns:cv="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="top"
    cv:curtainGravity="top"
    cv:curtainStatus="closed"
    cv:reboundMode="half"
    cv:scrollDuration="1000">

    <ImageView
        android:id="@id/iv1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:src="@drawable/ic_pull"/>

</org.aicaprio.curtainview.CurtainView>  

Attributes Desc :

  • curtainGravity : visual gravity of CurtainView.

  • curtainStatus : whether the CurtainView is opend or closed.

  • reboundMode : how will it scrolls when fingers off CurtainView

  • scrollDuration : scrolling duration after fingers off CurtainView.


Here is an attribute need to be noticed : fixedValue ,

which defines the minimum width or height( depends on the gravity ) appears on the screen , the default value is one third of the CurtainView's width or height( depends on the gravity ).

Usually we set this attribute in your java codes , for example:

We'd like iv1 completely showing when CurtainView is closed , so we just need to set the fixedValue to be iv1's height:

mCurtainView.post(
    () -> mCurtainView.setCurtainGravityAndFixedValue(null, mCurtainView.getHeight())
);

Thanks

Android-PullToRefresh

License

Copyright 2014 aicaprio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.