Android的 - 使滑动抽屉从左向右滑动 [英] Android - Making Sliding Drawer to slide from Left-to-Right

查看:224
本文介绍了Android的 - 使滑动抽屉从左向右滑动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了在使用下面的XML布局我的应用程序滑动抽屉: (我得到这个例子从androidpeople.com)

I have implemented "Sliding Drawer" in my application using the below XML layout: (I got this example from androidpeople.com)

<LinearLayout android:id="@+id/LinearLayout01"
 android:layout_width="fill_parent" android:layout_height="fill_parent"
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:background="@drawable/androidpeople">

 <SlidingDrawer 
  android:layout_width="wrap_content" 
  android:id="@+id/SlidingDrawer" 
  android:handle="@+id/slideHandleButton" 
  android:content="@+id/contentLayout" 
  android:layout_height="75dip"
  android:orientation="horizontal">

  <Button 
   android:layout_width="wrap_content" 
   android:layout_height="wrap_content" 
   android:id="@+id/slideHandleButton" 
   android:background="@drawable/closearrow">
  </Button>

  <LinearLayout 
   android:layout_width="wrap_content" 
   android:id="@+id/contentLayout" 
   android:orientation="horizontal" 
   android:gravity="center|top" 
   android:padding="10dip" 
   android:background="#C0C0C0" 
   android:layout_height="wrap_content">


   <Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Content"></Button>
   <Button android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Content"></Button>
   <Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Content"></Button>

  </LinearLayout>

 </SlidingDrawer>
</LinearLayout>

但我所想的幻灯片,而不是这个从右到左,如何使滑动抽屉由左到右的方向滑动???从左到右(水平)抽屉

but what i am wanting is to Slide the drawer from Left-to-right(Horizontal) instead of this right-to-left, how do i make slide drawer to slide from left-to-right direction ???

请与我分享你的想法/看法/意见/问题,并赶上我出这个问题。

pls share your idea/view/opinion/issue with me and catch me out of this problem.

感谢名单

推荐答案

下面是本教程:的链接

似乎没有定位的滑动抽屉,我无法找到由SDK提供的任何布局属性。但是,像在上面的教程,你可以写自己的滑动抽屉插件和应用布局属性来定位滑块/面板。

It seems that there is no positioning for sliding drawer, I can not find any layout attributes provided by the sdk. But like in the tutorial above you could write your own sliding drawer widget and apply layout attributes to position the slider/panel.

您可以检出 https://github.com/umano/AndroidSlidingUpPanel

这篇关于Android的 - 使滑动抽屉从左向右滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆