SlidingDrawer的使用

link_isme 2013-01-17 08:38:02
SlidingDrawer 的handle和content 怎么重叠?


要实现的效果

目前的效果

目前的代码:
<SlidingDrawer
android:id="@+id/slidingdrawer"
android:layout_width="match_parent"
android:layout_height="140dip"
android:layout_alignParentBottom="true"
android:content="@+id/content"
android:bottomOffset="50dip"
android:handle="@+id/handle" >

<FrameLayout
android:id="@+id/handle"
android:layout_width="match_parent"
android:layout_marginBottom="-30dip"
android:layout_height="wrap_content" >
<ImageButton
android:id="@+id/sliding_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:background="@drawable/sliding" />
</FrameLayout>

<LinearLayout
android:id="@+id/content"
android:layout_marginTop="-50dip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/sliding_bg"
android:gravity="center_vertical|right"
android:orientation="horizontal" >

<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Matthe0806@43.com"
android:textColor="@color/black"
android:textSize="18sp" />

<Button
android:id="@+id/logout_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginLeft="20dip"
android:background="@drawable/logout_btn_selector" />

<Button
android:id="@+id/sync_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="100dip"
android:background="@drawable/sync_btn_selector" />
</LinearLayout>
</SlidingDrawer>
...全文
104 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
link_isme 2013-01-18
  • 打赏
  • 举报
回复
解决了,最笨的办法--把圆形图标分成两部分切图。。。
link_isme 2013-01-17
  • 打赏
  • 举报
回复
用linearlayout的 android:layout_marginTop="-50dip" 不起作用。

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧