Giter Site home page Giter Site logo

slidingdrawerwithbuttons's Introduction

SlidingDrawerWithButtons(Google Play Demo)

SlidingDrawerWithButtons is an Open Source Android project that allows developers to easily create applications with sliding drawers with some context if you close drawer. Feel free to use it all you want in your Android apps provided that you cite this project and include the license in your app.

If you are using SlidingDrawerWithButtons in your app and would like to be listed here, please let me know via Twitter!

Also, you can follow my on Twitter : https://twitter.com/VKhudnitsky.

XML Usage

If you decide to use SlidingMenu as a view, you can define it in your xml layouts like this:

<v.hudnitsky.demo.slider.widget.MultiDirectionSlidingDrawerWithButtons android:layout_width="450dp" android:layout_height="fill_parent" android:orientation="vertical" android:layout_alignParentRight="true" xmlns:my="http://schemas.android.com/apk/res/v.hudnitsky.demo.slider" android:id="@+id/drawer_right" my:direction="rightToLeft" my:handle="@+id/slider" my:buttons="@+id/buttons" my:content="@+id/body">

        <Button
            android:layout_width="60dp"
            android:layout_height="120dp"
            android:layout_centerVertical="true"
            android:id="@+id/button4"
            android:background="@drawable/sliding_drawer_handle_right" />
    </RelativeLayout>
    <LinearLayout
        android:layout_width="60dp"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_centerVertical="true"
        android:padding="10dp"
        android:background="@drawable/pattern1"
        android:id="@+id/buttons"
        android:layout_alignParentLeft="false"
        android:layout_marginLeft="0dp"
        android:layout_alignParentTop="false"
        android:layout_marginTop="0dp"
        android:focusable="false">

        <Button
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/button"
            android:focusable="false"/>

        <Button
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/button2"
            android:focusable="false"/>
    </LinearLayout>

    <RelativeLayout
        android:layout_width="400dp"
        android:layout_height="fill_parent"
        android:background="#9e9e9e"
        android:id="@+id/body"
        android:layout_toRightOf="@+id/all_buttons"
        android:orientation="horizontal"
        android:animateLayoutChanges="true">

        <include
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            layout="@layout/pen_content" />
    </RelativeLayout>

</v.hudnitsky.demo.slider.widget.MultiDirectionSlidingDrawerWithButtons>

NOTE : you cannot use both behindOffset and behindWidth. You will get an exception if you try.

<declare-styleable name="MultiDirectionSlidingDrawerWithButtons">
    <attr name="handle" format="reference" />
    <attr name="content" format="reference" />
    <attr name="buttons" format="reference" />
    <attr name="direction" />
    <attr name="bottomOffset" format="dimension"  />
    <attr name="topOffset" format="dimension"  />
    <attr name="allowSingleTap" format="boolean" />
    <attr name="animateOnClick" format="boolean" />
</declare-styleable>

handle - a reference to the layout that you want to use as the above view of the SlidingDrawerWithButtons content - a reference to the layout that you want to use as the behind view of the SlidingDrawerWithButtons buttons - a reference to the layout that you want to use as other elements view of the SlidingDrawerWithButtons direction - a direction open slidingdrawer

Your layouts have to be based on a viewgroup. Developed By

Vladimir Hudnitsky

slidingdrawerwithbuttons's People

Contributors

xputnikx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fuycadw

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.