GithubHelp home page GithubHelp logo

aydroiddev / backdroplayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roiacult/backdroplayout

0.0 0.0 0.0 1.95 MB

this library is based on Material design guidance

Home Page: https://material.io/design/components/backdrop.html

License: Apache License 2.0

Kotlin 85.64% Java 14.36%

backdroplayout's Introduction

BackdropLayout

this library is based on Material design guidance (https://material.io/design/components/backdrop.html)

alt alt

Requirements

  • api 16 or higher
  • migrating to androidx

Setting up

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency in your app build.gradle file

dependencies {
	...
    implementation 'com.github.roiacult:BackdropLayout:VERSION'
}

Note : replace VERSION with latest version from jitpack

Usage

you need to include front and back layout inside backdropLayout and specifie front_layout and back_layout attribute or it will throw an exception

    <com.roacult.backdrop.BackdropLayout
            android:id="@+id/container"
            app:front_layout="@id/includedFront"
            app:back_layout="@id/includedBack"
            app:toolbarId="@id/toolbar"
            app:peekHeight="56dp"
            app:menuDrawable="@drawable/ic_menu"
            app:closeDrawable="@drawable/ic_close"
            app:animationDuration="400"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
        <include
                android:id="@+id/includedBack"
                layout="@layout/back_layout"/>
        <include
                android:id="@+id/includedFront"
                layout="@layout/front_layout"/>

    </com.roacult.backdrop.BackdropLayout>

app:front_layout : id of front layout (required)

app:back_layout : id of back layout (required)

app:toolbarId : id of toolbar when this attribute is specified BackdropLayout will automatically handle click event on toolbar and change state of backdroplayout and navigation icon according to the click

app:peekHeight : height of front layout header if not specified BackdropLayout will swip front layout out of screen when BackdropLayout is in open state

app:menuDrawable : drawable shown when BackdropLayout is in close State

app:menuDrawable : drawable shown when BackdropLayout is in open State

app:animationDuration : duration of swiping front layout

for more information see simple app included in this repo (https://github.com/roiacult/BackdropLayout/tree/master/app)

contact

alt text

backdroplayout's People

Contributors

roiacult avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.