0
我试图做这样的事情:在工具栏的背景添加图片中的Android
我的工具栏的当前代码:
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:theme="@style/MyTheme.ActionBarStyle"
android:background="@android:color/transparent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="-10dp"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/explore_morning"
android:contentDescription="@string/app_name" />
</RelativeLayout>
</android.support.v7.widget.Toolbar>
我的图像不覆盖整个屏幕