как создать верхнюю тень материальной нижней панели приложения - PullRequest
0 голосов
/ 28 мая 2020

Я пытаюсь создать нижнюю панель приложения, используя библиотеку com.google.material, и она успешно создана, но проблема в верхней части формы тени панели или высота не применима. Я искал последние 2 дня, но не нашел решения своей проблемы. Я также прикреплю картинку, что хочу оформить нижнюю панель приложений. Пожалуйста, помогите мне с enter image description here этой проблемой Я новичок в разработке android.

`

<?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"
    tools:context=".activities.HomeActivity">
    <com.google.android.material.bottomappbar.BottomAppBar
        android:elevation="@dimen/dp10"
        android:id="@+id/bottom_app_bar"
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:layout_gravity="bottom"
        app:backgroundTint="@android:color/white"
        android:fadingEdge="vertical"
        android:paddingEnd="53dp"
        android:paddingStart="53dp"
        >
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <LinearLayout
                android:id="@+id/iconlayout"
                android:layout_centerVertical="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <LinearLayout
                    android:orientation="vertical"
                    android:layout_weight="1"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content">
                    <ImageView
                        android:id="@+id/home_icon"
                        android:src="@drawable/ic_home_active"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"></ImageView>
                    <!-- <ImageView
                         android:layout_marginRight="12dp"
                         android:id="@+id/bullets_img_home"
                         android:layout_marginTop="5dp"
                         android:src="@drawable/ic_blue_bullet"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"></ImageView>-->
                </LinearLayout>
                <LinearLayout
                    android:layout_gravity="center"
                    android:orientation="vertical"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">
                    <ImageView
                        android:id="@+id/menu_icon"
                        android:src="@drawable/ic_menu_inactive"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"></ImageView>
                    <!-- <ImageView
                         android:visibility="gone"
                         android:id="@+id/bullets_img_menu"
                         android:layout_marginTop="5dp"
                         android:layout_gravity="center"
                         android:src="@drawable/ic_blue_bullet"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"></ImageView>-->
                </LinearLayout>

            </LinearLayout>
            <RelativeLayout
                android:animateLayoutChanges="true"
                android:id="@+id/view_layout"
                android:layout_marginTop="3dp"
                android:layout_below="@+id/iconlayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <RelativeLayout
                    android:background="@drawable/dotbtn"
                    android:layout_marginLeft="11dp"
                    android:layout_marginRight="12dp"
                    android:layout_alignParentStart="true"
                    android:id="@+id/bullets_img_menu"
                    android:layout_gravity="center"
                    android:layout_width="4dp"
                    android:layout_height="4dp"></RelativeLayout>
            </RelativeLayout>
        </RelativeLayout>
    </com.google.android.material.bottomappbar.BottomAppBar>
    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:backgroundTint="@color/main_color"
        android:src="@drawable/plusicon"
        app:fabCustomSize="65dp"
        app:borderWidth="0dp"
        android:adjustViewBounds="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_anchor="@id/bottom_app_bar" />
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <FrameLayout
            android:id="@+id/frame_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginBottom="40dp"></FrameLayout>
    </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

Это мой код макета`

...