How to add draggable icon with navigation drawer

耗尽温柔 提交于 2019-12-03 13:37:14

For drag layout there is github library which is useful for it
You can drag from left to right or any where. It will also slide from left to right & also drag is also possible.Drag Layout link

    <RelativeLayout
            android:id="@id/left_big_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#FF00FFFF">
        <TextView android:text="LEFT"
                  android:layout_centerInParent="true"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"/>
    </RelativeLayout>

    <ImageView android:id="@id/left_big_handle"
               android:background="@drawable/handle"
               android:layout_gravity="top"
               android:layout_marginTop="12dp"
               android:layout_width="24dp"
               android:layout_height="80dp"/>
</com.kedzie.drawer.DraggedDrawer>

handle.xml drawable file of handle

<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true" android:drawable="@drawable/status_bar_close_red" />

    <item android:drawable="@drawable/status_bar_close_off" />

</selector>

ScreenShot

Hope this is useFul for you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!