程序显示界面怎样设置成从标题栏底下开始

zsrdfgsaef 2015-12-31 02:54:37
如题 ,我的界面总是会被标题栏遮挡

这个是用侧滑栏DrawerLayout,它的显示遮住了标题栏


而底下呈现出来的内容又被标题栏遮挡住了

...全文
103 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
MoneyCitys 2015-12-31
  • 打赏
  • 举报
回复
那你這蠻奇特的, 沒用toolbar就是actionbar了吧 是不是開啟了Overlay Mode 能看一下你的Theme嗎 另外就是主佈局的content_frame有內容嗎?
zsrdfgsaef 2015-12-31
  • 打赏
  • 举报
回复
引用 2 楼 MoneyCitys 的回复:
在xml下將ToolBar的位置宣告在drawerlayout外層就好
这是主布局的Xml ,没有用到toolbar,麻烦您帮我看一下 <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent"> </FrameLayout> <ListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:background="#ffffcc" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp"> </ListView> </android.support.v4.widget.DrawerLayout>
MoneyCitys 2015-12-31
  • 打赏
  • 举报
回复
在xml下將ToolBar的位置宣告在drawerlayout外層就好
zsrdfgsaef 2015-12-31
  • 打赏
  • 举报
回复
该怎么设置呢???

80,337

社区成员

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

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