작성
·
221
0
왜 이런가요?ㅠㅠ
bottom_navigation_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_home"
android:icon="@drawable/ic_home"
android:enabled="true"
android:title="@string/home"/>
<item
android:id="@+id/action_search"
android:icon="@drawable/ic_search"
android:enabled="true"
android:title="@string/home"/>
<item
android:id="@+id/action_add_photo"
android:icon="@drawable/ic_add_a_photo"
android:enabled="true"
android:title="@string/home"/>
<item
android:id="@+id/action_favorite_alarm"
android:icon="@drawable/ic_favorite_border"
android:enabled="true"
android:title="@string/home"/>
<item
android:id="@+id/action_account"
android:icon="@drawable/ic_account"
android:enabled="true"
android:title="@string/home"/>
</menu>
activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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=".MainActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="35dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/logo_title" />
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:id="@+id/toolbar_division"
android:background="@color/colorDivision"
android:orientation="horizontal"
android:layout_below="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="1dp"></LinearLayout>
<FrameLayout
android:id="@+id/main_content"
android:layout_below="@+id/toolbar_division"
android:layout_above="@id/nav_division"
android:layout_width="match_parent"
android:layout_height="match_parent"></FrameLayout>
<LinearLayout
android:id="@+id/nav_division"
android:background="@color/colorDivision"
android:orientation="horizontal"
android:layout_above="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="1dp"></LinearLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/bottom_navigation_main">
</com.google.android.material.bottomnavigation.BottomNavigationView>
</RelativeLayout>