【问题标题】:How to change the background of the Action Bar如何更改操作栏的背景
【发布时间】:2015-10-10 17:57:21
【问题描述】:

如何将应用中操作栏的背景更改为可绘制文件夹中的图像?如果您能告诉我哪个代码在哪个文件中,那就太好了。

【问题讨论】:

标签: android image action


【解决方案1】:

在您的工具栏中添加此属性:

 android:background="@drawable/yourImage"

【讨论】:

    【解决方案2】:

    您可以像这样简单地设置操作栏的背景:

        <android.support.v7.widget.Toolbar
            android:id="@+id/your_app_bar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@drawable/your_drawable" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-25
      • 1970-01-01
      • 1970-01-01
      • 2014-11-22
      • 1970-01-01
      相关资源
      最近更新 更多