Android Studio 如何设置工具栏下方的背景图像?

mm9b1k5b  于 2022-11-16  发布在  Android
关注(0)|答案(1)|浏览(114)

我在android工作室工作,在我设置了一个工具栏后,我注意到它越过了背景,破坏了它。有没有办法降低背景?
我不知道该尝试什么我不知道该做什么

<include
    android:id="@+id/toolbar"
    layout="@layout/toolbar"
    ></include>

enter image description here

oymdgrw7

oymdgrw71#

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.admin.booking.BookingActivity">
    <include
        android:id="@+id/toolbar_layout"
        layout="@layout/layout_toolbar" />
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/iv_parking"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="?actionBarSize"
        android:background="@color/black"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar_layout">
        
    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

相关问题