/VerticalDrawer

A Simple Vertical Drawer View(一个简单的纵向抽屉)

Primary LanguageJava

VerticalDrawer

Download

A Simple Vertical Drawer View 中文

Demo

There is something wrong with the demo gif , real demo is smooth

image

How to use

Add dependency

In project build.gradle

allprojects {
     repositories {
        ...
        jcenter()
    }
}

In app build.gradle

dependencies {
    implementation 'org.yang.lib:VerticalDrawer:1.0.0'
}

Usage

VerticalDrawerView drawer = findViewById(R.id.vd);

// add indicator
drawer.setIndicator(drawable, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());

// add background
drawer.setBackground(ContextCompat.getDrawable(this, R.drawable.drawer_view_background));

// add content. using same content
drawer.setCollapsedView(contentView, dp2px(33));
drawer.setExpandedView(contentView);

// or using different content
drawer.setCollapsedView(collapseContentView);
drawer.setExpandedView(expandContentView);