我使用下面的XML布局在我的应用程序中实现了"Sliding Drawer":(我从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>
Run Code Online (Sandbox Code Playgroud)
但我想要的是将抽屉从左向右(水平)而不是从右向左滑动,如何使滑动抽屉从左向右滑动?
请与我分享您的想法/观点/意见/问题,并让我摆脱这个问题.
我想开发一个与通知面板相同的动画面板.我的意思是说通知面板是一个很酷的控件,你可以抓住并向下滑动通知栏并查看所有通知.
实际上,我有两个UI,第一个应该用Button显示在顶部,当用户点击该按钮时,带有listview项目的第二个UI应该与通知面板一样向下滑动,当用户单击或拖动第二个用户界面时顶端,然后第二个UI应该变得不可见.我希望我明白我的问题.
从Christian's answer,我正在尝试使用一个滑动抽屉,它将显示一个选项列表.我需要这个来扩展页面上的当前ListView.
因此,如果有人知道如何使用向下滑动动画实现这样的布局或UI,那么请分享它.
请建议如何使用此类控件或布局进行构建?任何想法或建议
感谢名单
我开发了一个Android应用程序,需要一个侧边栏,就像三星边栏一样.侧边栏分别包含多个控件.
供参考:http: //www.thinkdigit.com/FCKeditor/uploads/samsung-corby-s3650-2.jpg