Make Android DrawerLayout can be dragged out in real-time within the range of fullscreen

Overview

FullDraggableDrawer

License maven-central

Make the DrawerLayout can be dragged/pulled out in real-time within the range of fullscreen, like Pure Writer

* Full demo video: https://t.me/PureWriter/549

Getting started

In your build.gradle:

dependencies {
  implementation 'com.drakeet.drawer:drawer:1.0.3'
  // Optional: No need if you just use the FullDraggableHelper
  implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
}

Usage

Replace the main Layout of DrawerLayout with the FullDraggableContainer (or you can just add it as a new wrapper/layer):

">
<androidx.drawerlayout.widget.DrawerLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/drawer"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

  
  <com.drakeet.drawer.FullDraggableContainer
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    

  com.drakeet.drawer.FullDraggableContainer>

  <FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="left">

    

  FrameLayout>

androidx.drawerlayout.widget.DrawerLayout>

That's all, you're good to go!

Advanced usage

See com.drakeet.drawer.FullDraggableHelper

TODO

  • Add support for the right drawer / RTL
  • Add support for other kinds of drawers

License

Copyright (c) 2021. Drakeet Xu

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 might also like...
An Android library that help you to build app with swipe back gesture.
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images.  Plugins are available for features like markers, hotspots, and path drawing.
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Ultra Pull to Refresh for Android. Support all the views.

Welcome to follow me on GitHub or Twitter GitHub: https://github.com/liaohuqiu Twitter: https://twitter.com/liaohuqiu 中文版文档 Wanna auto-load-more? This

A very simple arc layout library for Android
A very simple arc layout library for Android

ArcLayout A very simple arc layout library for Android. Try out the sample application on the Play Store. Usage (For a working implementation of this

Android layout that simulates physics using JBox2D
Android layout that simulates physics using JBox2D

PhysicsLayout Android layout that simulates physics using JBox2D. Simply add views, enable physics, and watch them fall! See it in action with the sam

Android component which presents a dismissible view from the bottom of the screen
Android component which presents a dismissible view from the bottom of the screen

BottomSheet BottomSheet is an Android component which presents a dismissible view from the bottom of the screen. BottomSheet can be a useful replaceme

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Allows the easy creation of animated transition effects when the state of Android UI has changed
Allows the easy creation of animated transition effects when the state of Android UI has changed

android-transition Android-Transition allows the easy creation of view transitions that reacts to user inputs. The library is designed to be general e

Stale Android Toasts made tasty.
Stale Android Toasts made tasty.

FrenchToast Stale Android Toasts made tasty. Android Toasts are amazing, but they have a few major drawbacks: You cannot control when they show up as

Comments
  • Execution failed for task ':app:minifyReleaseWithR8'.

    Execution failed for task ':app:minifyReleaseWithR8'.

    Task :app:minifyReleaseWithR8 FAILED AGPBI: {"kind":"error","text":"Expected field or method name at /Users/q/gradle-6.5.1/caches/transforms-2/files-2.1/8af3b3385587d1e3809e74baa82ecc72/jetified-drawer-1.0.2/proguard.txt:2:23\n private mListeners;\n ^","sources":[{"file":"/Users/q/gradle-6.5.1/caches/transforms-2/files-2.1/8af3b3385587d1e3809e74baa82ecc72/jetified-drawer-1.0.2/proguard.txt","position":{"startLine":1,"startColumn":22,"startOffset":90}}],"tool":"R8"}

    Execution failed for task ':app:minifyReleaseWithR8'.

    com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: offset: 90, line: 2, column: 23, origin: /Users/q/gradle-6.5.1/caches/transforms-2/files-2.1/8af3b3385587d1e3809e74baa82ecc72/jetified-drawer-1.0.2/proguard.txt

    debug编译可以运行,assembleRelease或bundleRelease报上面错误,我项目用了AndResGuard 1.2.20

    opened by vfishv 1
  • 请教大佬,左右滑动事件和点击事件被分发到下层

    请教大佬,左右滑动事件和点击事件被分发到下层

    感谢大佬开源!有个问题想您请教。 抽屉打开时,左右滑动事件和点击事件依然会传递到下层页面,请教大佬这种情况要如何处理?情况如录屏所示 下方是viewpager2和fragment

    https://user-images.githubusercontent.com/20718624/104319146-6dd3b100-551b-11eb-8ba9-d3d6d984b4a7.mp4

    opened by boboqun 1
  • Add support for other kinds of drawers

    Add support for other kinds of drawers

    Add a FullDraggableHelper to hold the reusable part so that we can use it for other kinds of drawers.

    • Rename dismissDrawer() to smoothCloseDrawer()
    • Make drawerlayout as an optional and compileOnly dependency
    opened by drakeet 0
  • Full or not full draggable according to a parameter

    Full or not full draggable according to a parameter

    Hi,

    Thanks for your library. I'd like to know if there is a way to decide whether the drawer is draggable from anywhere (as with your library) or only from the side of the screen (as default android), because we discovered that depending on usage, we have users that really want one or really want the other one.

    The best thing we have found right now, in our app is to have two .xml files depending on which way we want to use the app, but it's far from ideal. Any help here would be deeply appreciated

    I read your readme

    Advanced usage See com.drakeet.drawer.FullDraggableHelper

    does not really help, I fear the lack of comment, and the fact that I don't know the layout well mean that I don't know what I can do here. But it does not even seem that there is a way for me to control anything from there

    opened by Arthur-Milchior 0
Releases(1.0.2)
Owner
Pure Writer
❤️ Open Sources from Pure Writer
Pure Writer
SwipeBack is an android library that can finish a activity by using gesture.

SwipeBack SwipeBack is a android library that can finish a activity by using gesture. You can set the swipe direction,such as left,top,right and botto

Eric 1.7k Nov 21, 2022
A 3D Layout for Android,When you use it warp other view,it can became a 3D view,一秒让你的view拥有3D效果!

ThreeDLayout A 3D Layout,When you use it warp other view,it can became a 3D view 中文文档 preview USAGE 1.compile library allprojects { repositories {

androidwing 490 Oct 27, 2022
Draftsman is an on device layout inspector which can be embedded in your android app.

Draftsman Draftsman is an on-device layout inspector for Android apps. It allows you to view various properties of rendered Android Views such as widt

Gojek 243 Dec 22, 2022
A togglelayout that can be used in setting interface

ToggleExpandLayout A togglelayout that can be used in setting interface. Originally designed by dribbble. And the author said that's why he designed t

Rongchan Liu 893 Dec 6, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.

Please switch to DragView, for the best support, thank you DraggablePanel Download allprojects { repositories { ... maven { url 'https://jitp

Hoàng Anh Tuấn 103 Oct 12, 2022
FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

null 33 Dec 8, 2022
An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu

ResideLayout An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu. Can be used on Android 1.6(I haven't try it.)

Yang Hui 392 Oct 12, 2022