-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 feat/메인화면 : MainActivity 에 BottomNavigationView 추가
- Loading branch information
1 parent
c3d9647
commit 00d5248
Showing
4 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
app/src/main/res/color/selector_main_bottom_navigation_color.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="@color/gray_800" android:state_checked="true" /> | ||
<item android:color="@color/gray_200" android:state_checked="false" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<layout 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=".ui.main.MainActivity"> | ||
tools:context=".ui.main.MainActivity" | ||
> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="이곳은 카카오 로그인 후 넘어온 메인 액티비티입니다." | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
<data> | ||
<variable | ||
name="viewModel" | ||
type="com.ftw.hometerview.ui.main.MainViewModel" | ||
/> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
> | ||
|
||
<FrameLayout | ||
android:id="@+id/frame_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation" | ||
app:layout_constraintTop_toTopOf="parent" | ||
/> | ||
|
||
<com.google.android.material.bottomnavigation.BottomNavigationView | ||
android:id="@+id/bottom_navigation" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:menu="@menu/menu_main_bottom_navigation" | ||
app:itemBackground="@color/white" | ||
app:itemIconTint="@color/selector_main_bottom_navigation_color" | ||
app:itemTextColor="@color/selector_main_bottom_navigation_color" | ||
app:itemIconSize="@dimen/main_bottom_navigation_icon_size" | ||
app:onNavigationItemSelected="@{viewModel::onNavigationItemSelected}" | ||
app:labelVisibilityMode="labeled" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
/> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:id="@+id/home" | ||
android:enabled="true" | ||
android:icon="@drawable/icon_home" | ||
android:title="@string/main_bottom_navigation_menu_home" | ||
/> | ||
<item android:id="@+id/map" | ||
android:enabled="true" | ||
android:icon="@drawable/icon_map" | ||
android:title="@string/main_bottom_navigation_menu_map" | ||
/> | ||
<item android:id="@+id/heart" | ||
android:enabled="true" | ||
android:icon="@drawable/icon_heart" | ||
android:title="@string/main_bottom_navigation_menu_heart" | ||
/> | ||
<item android:id="@+id/user" | ||
android:enabled="true" | ||
android:icon="@drawable/icon_user" | ||
android:title="@string/main_bottom_navigation_menu_user" | ||
/> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters