【问题标题】:Toolbar elevation is not at the bottom工具栏标高不在底部
【发布时间】:2015-11-23 21:12:35
【问题描述】:

我正在尝试创建一个扩展工具栏,例如:

我的活动 xml:

<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:ignore="MergeRootFrame" >

<android.support.v7.widget.Toolbar
    android:id="@+id/my_toolbar"
    android:layout_height="128dp"
    android:layout_width="match_parent"
    android:minHeight="?attr/actionBarSize"
    android:background="?attr/colorPrimary" />

由于某种原因,海拔不在工具栏的底部:

有什么想法吗?

谢谢!

【问题讨论】:

    标签: android material-design android-appcompat android-toolbar android-elevation


    【解决方案1】:

    终于找到了 - 显示了两个工具栏,一个是装饰工具栏,一个是我添加的工具栏。将我的主题更改为从“Theme.AppCompat.Light.NoActionBar”继承,现在只有我的工具栏可见。

    还是谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-27
      • 2011-04-02
      • 1970-01-01
      • 1970-01-01
      • 2011-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多