Android Studio XML设计版面预览宽度混乱

时间:2015-10-21 13:31:17

标签: xml android-studio

我不知道它何时以及为何开始发生,但有时我的项目构建xml设计预览宽度变得奇怪,工具栏填充在状态栏下方(请参阅随附的图片)。设备上的一切都很好,它只发生在IDE上。 我的猜测是关于我的项目某处的fitsSystemWindows标记,但我没有修复它。

enter image description here

有没有人遇到类似的问题来帮助我?欣赏。

1 个答案:

答案 0 :(得分:1)

您可以发布您的xml布局吗?这是我的xml布局,以便它显示为您的工具栏属性,如下所示:

check the image here

<android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_marginTop="-10dp"
            android:layout_height="73dp"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />