Home>

I want to make the toolbar invisible, how do I do that? Here is my Toolbar

<
com.google.android.material.appbar.AppBarLayout
        android: layout_width= "match_parent"
        android: layout_height= "wrap_content"
        app: layout_constraintTop_toTopOf= "parent" >
        <
androidx.appcompat.widget.Toolbar
            android: id= "@ + id /toolbar"
            android: layout_width= "match_parent"
            android: background= "@ android: color /transparent"
            android: layout_height= "wrap_content"
            android: theme= "@ style /ThemeOverlay.AppCompat.Dark.ActionBar"
            app: title= "" >
<
/androidx.appcompat.widget.Toolbar>    <
/com.google.android.material.appbar.AppBarLayout>

And theme

<
item name= "windowActionBar" >
false <
/item >
        <
item name= "windowActionBarOverlay" >
true <
/item >
        <
item name= "android: windowActionBarOverlay" >
true <
/item >
        <
item name= "colorPrimary" >
@android: color /transparent <
/item >
        <
item name= "android: windowContentOverlay" >
@ null <
/item >
        <
item name= "colorPrimaryVariant" >
@ null <
/item >

The problem is that the border remains from the toolbar

Please clarify your specific problem or provide more detailed information on what exactly you need. As it stands, it is difficult to understand exactly what you are asking.

Дух сообщества2021-09-21 07:06:21

why would you make him invisible? If you don't need it, just remove it, or do visibility= GONE

Георгий Чеботарев2021-09-21 09:18:59

try app: elevation= "0dp" for AppBarLayout

IR422021-09-21 10:59:44