码迷,mamicode.com
首页 > 移动开发 > 详细

android.support.design.widget.AppBarLayout 在android5.0+底部显示空白条问题

时间:2016-05-10 23:15:41      阅读:870      评论:0      收藏:0      [点我收藏+]

标签:

在最外层使用
RelativeLayout作为根节点,同时设置
android:fitsSystemWindows="true"
问题解决.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:fitsSystemWindows="true">

<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!--标题栏 Toolbar-->
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:minHeight="48dp"
android:layout_height="48dp"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme" />
</android.support.design.widget.AppBarLayout>

android.support.design.widget.AppBarLayout 在android5.0+底部显示空白条问题

标签:

原文地址:http://www.cnblogs.com/yshyee/p/5479629.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!