How we can use slider Drawer from left to right orientation in Android

烈酒焚心 提交于 2019-12-09 03:24:37

问题


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:


You can find very good example for that here.

From that you can download source code and run it.

You can also check in this link.




回答2:


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.



来源:https://stackoverflow.com/questions/14393755/how-we-can-use-slider-drawer-from-left-to-right-orientation-in-android

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