activity_main.xml 3.0 KB
Newer Older
S
suhy 已提交
1
<?xml version="1.0" encoding="utf-8"?>
S
temp  
suhy 已提交
2
<androidx.constraintlayout.widget.ConstraintLayout
S
suhy 已提交
3 4 5 6 7 8
    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:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
S
temp  
suhy 已提交
9 10 11 12 13 14




    <com.example.myhomework.view.RadiusCardView
            android:id="@+id/radiusCardView"
S
suhy 已提交
15
            android:layout_width="match_parent"
S
temp  
suhy 已提交
16 17
            android:layout_height="wrap_content"
            app:cardElevation="0dp"
S
suhy 已提交
18
            app:layout_constraintBottom_toBottomOf="parent"
S
temp  
suhy 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:rcv_topLeftRadiu="20dp"
            app:rcv_topRightRadiu="20dp">

            <com.google.android.material.bottomnavigation.BottomNavigationView
                android:id="@+id/bottom_nav"
                android:layout_width="match_parent"
                android:layout_height="70dp"
                android:background="#B3D4EA"
                app:itemIconSize="25dp"
                app:itemIconTint="@color/selector_color"
                app:itemTextColor="@color/selector_color"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="1.0"
                app:menu="@menu/bottom_nav_menu" />


        </com.example.myhomework.view.RadiusCardView>

    <ImageButton
S
addView  
suhy 已提交
44
        android:id="@+id/btn_add"
S
temp  
suhy 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@color/transparent"
        android:scaleType="fitXY"
        app:borderWidth="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.97"
        app:srcCompat="@drawable/add_btn" />


S
addView  
suhy 已提交
59 60 61 62 63 64 65 66 67 68 69 70 71
    <fragment
        android:id="@+id/nav_host_fragment_activity_main"
        android:name="androidx.navigation.fragment.NavHostFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:defaultNavHost="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="1.0"
        app:navGraph="@navigation/mobile_navigation" />
S
temp  
suhy 已提交
72 73

</androidx.constraintlayout.widget.ConstraintLayout>