How we can use slider Drawer from left to right or

2020-03-30 05:45发布

How we can use slider Drawer from left to right flow in Android Tablet. by default slider flow from bottom to top, but when we give horizontal orientation to it , it's flow of sliding will be right to left . But i need it's flow from left to right.

Thanks in Advance

1条回答
家丑人穷心不美
2楼-- · 2020-03-30 06:29

enter image description here

Do you need something like this..

 <com.example.example.SlidingDrawer
     xmlns:my="http://schemas.android.com/apk/res/com.example.example"
     android:id="@+id/drawer"
     android:layout_width="301dp"
     android:layout_height="wrap_content"
     my:content="@+id/content"
     my:direction="leftToRight"
     my:handle="@+id/handle" >
      <ImageView 
   android:id="@+id/handle"
   android:layout_width="wrap_content"
   android:layout_height="fill_parent" 
   android:src="@drawable/tags"/>

  <LinearLayout
      android:id="@+id/content"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:background="@drawable/slidimage"
      android:orientation="vertical"
      android:layout_gravity="right"
      android:padding="10dp" >
</LinearLayout>
    </com.example.example.SlidingDrawer>

Here you can find example.

查看更多
登录 后发表回答