All Projects → qiaoyunrui → SlipperyLayout

qiaoyunrui / SlipperyLayout

Licence: other
A layout that supports sliding.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to SlipperyLayout

CoolView
一些炫酷的自定义控件(Some cool custom controls),逐步完善中...
Stars: ✭ 63 (+43.18%)
Mutual labels:  view, viewgroup
drag-to-close
Android library that provides a view group which allows to finish an activity by dragging a view.
Stars: ✭ 69 (+56.82%)
Mutual labels:  view, viewgroup
bottomsheets
Material Bottom Sheets library for Android
Stars: ✭ 76 (+72.73%)
Mutual labels:  view, viewgroup
Calendarview
Calendar View Library
Stars: ✭ 71 (+61.36%)
Mutual labels:  view, viewgroup
Nestedtouchscrollinglayout
🎱处理子 View,父 View 嵌套滚动,成本比 support v4 NestedScrolling 低,放心食用~
Stars: ✭ 557 (+1165.91%)
Mutual labels:  view, viewgroup
FlowlayoutTags
具有标签功能的流式布局,接口简单。可多选单选,可记住选择状态,状态切换有过渡动画。
Stars: ✭ 78 (+77.27%)
Mutual labels:  view, viewgroup
ShadowDrawable
为View 和 ViewGroup 添加阴影效果--Android,Add shadow for single view or viewgroup layout.
Stars: ✭ 22 (-50%)
Mutual labels:  view, viewgroup
bubble-layout
An Android ViewGroup that displays avatar bubbles... similar to the chat bubbles on Facebook Messenger.
Stars: ✭ 46 (+4.55%)
Mutual labels:  view, viewgroup
Chips Input Layout
A customizable Android ViewGroup for displaying Chips (specified in the Material Design Guide).
Stars: ✭ 591 (+1243.18%)
Mutual labels:  view, viewgroup
Slidemenulayout
🔥An android slide menu that supports left and right swipes and slides with parallax.(一个支持左右滑动并带有视差滑动效果的安卓侧滑菜单控件.仿[QQ/探探侧滑])
Stars: ✭ 235 (+434.09%)
Mutual labels:  view, viewgroup
mysql-interview-questions
SQL Basics
Stars: ✭ 202 (+359.09%)
Mutual labels:  view
pulldownlayout
PullDownLayout is a small library that allows you to implement a view that can be dragged down your layout. PullDownLayout can also be used to implement Pull-To-Dismiss feature for your activities and fragments.
Stars: ✭ 16 (-63.64%)
Mutual labels:  view
Panda
Create view hierarchies declaratively.
Stars: ✭ 69 (+56.82%)
Mutual labels:  view
andColorPicker
Color picker library for Android
Stars: ✭ 233 (+429.55%)
Mutual labels:  view
ShadowStackView
Create something like Shadow-View animation when drag the view on screen
Stars: ✭ 25 (-43.18%)
Mutual labels:  view
chords
A Kotlin multi-platform view library for displaying stringed instrument chord diagrams
Stars: ✭ 25 (-43.18%)
Mutual labels:  view
FeedbackAnimSample
An attempt to code feedback animation UI inspired from https://site.uplabs.com/posts/web-feedback
Stars: ✭ 57 (+29.55%)
Mutual labels:  view
ViewWorld
自定义View合集,展示各种自定义View/控件。项目包含了自定义Banner轮播图控件,自定义验证码输入框,自定义TabLayout等控件,持续更新中😉😉😉
Stars: ✭ 94 (+113.64%)
Mutual labels:  view
anchored-behavior
A CoordinatorLayout Behavior to anchor views with an animation.
Stars: ✭ 17 (-61.36%)
Mutual labels:  view
blade
🏃 A library for using Laravel Blade templates in WordPlate.
Stars: ✭ 28 (-36.36%)
Mutual labels:  view

SlipperyLayout

minSdkVersion 21

This is a simple ViewGroup that support sliding to show menu, you can set the sliding direction, left、right、top、bottom.

In addition, it also solved the problem of the sliding conflict, so you can put it on your RecyclerView or in the ListView.

Preview

Download the demo

dependencies

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.qiaoyunrui:SlipperyLayout:v1.1'
}

Usage

Add to your layout xml-file:

<com.juhezi.slipperylayout.SlipperyLayout
        android:id="@+id/sl_test"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:layout_margin="8dp"
        app:content="@layout/content"
        app:lock="false"
        app:menu="@layout/menu"
        app:slideGravity="top" />

Properties provided:

  • content: the layout of content

  • menu: the layout of menu

  • slideGravity: the sliding direction

  • lock: if true,can not be slided.

Control SlipperyLayout opened or closed in the code

SlipperyLayout mSlTest = (SlipperyLayout) findViewById(R.id.sl_test);
Button mBtnOpen = (Button) findViewById(R.id.btn_open);
Button mBtnClose = (Button) findViewById(R.id.btn_close);
mBtnOpen.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        mSlTest.openMenuView();   //opene the menu
    }
});
mBtnClose.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        mSlTest.closeMenuView();  //close the menu
    }
});

Methods provided:

  • public void setSlideGravity(@SlideGravity int slideGravity),set the sliding direction

  • public boolean isLock(),whether the lock slide

  • public void setLock(boolean lock),set the lock (if set to true, SlipperyLayout cannot slide)

  • public boolean isMenuViewVisible(),get the visibility of menu view

  • public View getMenuView(),get the menu view

  • public View getContentView(),get the content view

  • public void openMenuView(),open menu

  • public void closeMenuView(),close menu

  • public void setSlideListener(),set the listener

  • public void removeSlideListener(),remove the setted listener

Methods provided in the SlideListener

  • public void onSliding(View menuView, int dx, int dy)

  • public void onMenuOpened(View menuView)

  • public void onMenuClosed(View menuView)

  • public void onStateChanged(@SlipperyLayout.State int oldState, @SlipperyLayout.State int newState)

Attention

SlipperyLayout supports the Padding and Margin, but does not support elevation.

If you met what problem in use process, please create the issue or send an email to me, my email is [email protected].

中文 README

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].