Rectangular thing displaying in App bottom used with toolar

20 Views Asked by At

I would like to ask, how should I remove this, I have tried mutiple things and tried changing all its attribute but its not going,

Screenshot the UI

Xml Code for this

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    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"
    android:background="@drawable/logo2"
    tools:context=".Activities.DashboardActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="#f2f2f2"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@android:color/transparent"
            app:titleTextColor="@color/black"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

    </com.google.android.material.appbar.AppBarLayout>

    <FrameLayout
        android:id="@+id/fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentTop="true"
        android:paddingTop="?attr/actionBarSize" />

    <com.google.android.material.bottomappbar.BottomAppBar
        android:id="@+id/bottomappbar"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_gravity="bottom"
        android:backgroundTint="@color/white"
        app:fabCradleMargin="10dp"
        app:fabCradleRoundedCornerRadius="0dp"
        app:fabCradleVerticalOffset="10dp"
        >

        <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottomNavigation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            app:menu="@menu/bottom_menu" />


    </com.google.android.material.bottomappbar.BottomAppBar>


    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fabHome"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/home"
        app:backgroundTint="#cc0c52"
        app:layout_anchor="@id/bottomappbar"
        app:layout_anchorGravity="start"
        app:layout_constraintBottom_toBottomOf="parent"
        app:tint="#ffffffff" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

I tried removing stuff like fab cradle margin that co-pilot and other ai suggested but still no answer, I hope that somebody could guide what to do to remove that rectangle in toolbar, as it causing the user experience to dimish.

0

There are 0 best solutions below