Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design/#30] Bottom Navigation 디자인 적용 #31

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/src/main/res/color/sel_bottom_nav_icon.xml
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/primary_500" android:state_checked="true"/>
<item android:color="@color/grey_800" android:state_checked="false"/>
</selector>
5 changes: 5 additions & 0 deletions app/src/main/res/color/sel_bottom_nav_text.xml
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/primary_500" android:state_checked="true" />
<item android:color="@color/grey_800" android:state_checked="false"/>
</selector>
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/ic_home.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="19dp"
android:viewportWidth="18"
android:viewportHeight="19">
<path
android:pathData="M1,8L9,1L17,8V18H12V14C12,13.204 11.684,12.441 11.121,11.879C10.559,11.316 9.796,11 9,11C8.204,11 7.441,11.316 6.879,11.879C6.316,12.441 6,13.204 6,14V18H1L1,8Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#BBADA4"
android:strokeColor="#BBADA4"
android:strokeLineCap="round"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M0.25,1C0.25,0.586 0.586,0.25 1,0.25H17C17.414,0.25 17.75,0.586 17.75,1V17C17.75,17.414 17.414,17.75 17,17.75H1C0.586,17.75 0.25,17.414 0.25,17V1ZM4,4.25C3.586,4.25 3.25,4.586 3.25,5C3.25,5.414 3.586,5.75 4,5.75H14C14.414,5.75 14.75,5.414 14.75,5C14.75,4.586 14.414,4.25 14,4.25H4ZM3.25,9C3.25,8.586 3.586,8.25 4,8.25H14C14.414,8.25 14.75,8.586 14.75,9C14.75,9.414 14.414,9.75 14,9.75H4C3.586,9.75 3.25,9.414 3.25,9ZM8,12.25C7.586,12.25 7.25,12.586 7.25,13C7.25,13.414 7.586,13.75 8,13.75H14C14.414,13.75 14.75,13.414 14.75,13C14.75,12.586 14.414,12.25 14,12.25H8Z"
android:fillColor="#BBADA4"
android:fillType="evenOdd"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M10,0H8C7.448,0 7,0.448 7,1V1.569C7,1.997 6.713,2.368 6.318,2.532C5.923,2.696 5.462,2.634 5.16,2.331L4.757,1.929C4.367,1.538 3.734,1.538 3.343,1.929L1.929,3.343C1.538,3.734 1.538,4.367 1.929,4.757L2.331,5.16C2.634,5.462 2.696,5.923 2.532,6.318C2.368,6.713 1.997,7 1.569,7H1C0.448,7 0,7.448 0,8V10C0,10.552 0.448,11 1,11H1.569C1.997,11 2.368,11.287 2.532,11.682C2.696,12.078 2.634,12.538 2.331,12.84L1.929,13.243C1.538,13.633 1.538,14.266 1.929,14.657L3.343,16.071C3.734,16.462 4.367,16.462 4.757,16.071L5.16,15.669C5.462,15.366 5.922,15.304 6.318,15.468C6.713,15.632 7,16.003 7,16.431V17C7,17.552 7.448,18 8,18H10C10.552,18 11,17.552 11,17V16.431C11,16.003 11.287,15.632 11.682,15.468C12.078,15.304 12.538,15.366 12.84,15.669L13.243,16.071C13.633,16.462 14.266,16.462 14.657,16.071L16.071,14.657C16.462,14.266 16.462,13.633 16.071,13.243L15.669,12.84C15.366,12.538 15.304,12.078 15.468,11.682C15.632,11.287 16.003,11 16.431,11H17C17.552,11 18,10.552 18,10V8C18,7.448 17.552,7 17,7H16.431C16.003,7 15.632,6.713 15.468,6.318C15.304,5.922 15.366,5.462 15.669,5.16L16.071,4.757C16.462,4.367 16.462,3.734 16.071,3.343L14.657,1.929C14.266,1.538 13.633,1.538 13.243,1.929L12.84,2.331C12.538,2.634 12.078,2.696 11.682,2.532C11.287,2.368 11,1.997 11,1.569V1C11,0.448 10.552,0 10,0ZM9,11C10.105,11 11,10.105 11,9C11,7.895 10.105,7 9,7C7.895,7 7,7.895 7,9C7,10.105 7.895,11 9,11Z"
android:fillColor="#BBADA4"
android:fillType="evenOdd"/>
</vector>
24 changes: 24 additions & 0 deletions app/src/main/res/drawable/sel_bottom_nav_indicator.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<layer-list>
<item android:gravity="top">
<shape android:shape="rectangle">
<size android:height="1dp" />
<solid android:color="@color/primary_500" />
</shape>
</item>
</layer-list>
</item>

<item android:state_checked="false">
<layer-list>
<item android:gravity="top">
<shape android:shape="rectangle">
<size android:height="1dp" />
<solid android:color="@color/grey_400" />
</shape>
</item>
</layer-list>
</item>
</selector>
11 changes: 8 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent"/>
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/bnv_main"/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
Expand All @@ -21,6 +22,10 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:itemIconSize="24dp"
app:menu="@menu/menu_bottom"/>
app:itemIconTint="@color/sel_bottom_nav_icon"
app:menu="@menu/menu_bottom"
app:itemBackground="@drawable/sel_bottom_nav_indicator"
app:itemActiveIndicatorStyle="@null"
app:itemTextColor="@color/sel_bottom_nav_text"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_back_answer_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toTopOf="parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_button"
Expand All @@ -31,8 +31,8 @@
android:layout_marginHorizontal="33dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="23dp"
app:layout_constraintTop_toBottomOf="@id/tv_confirm"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_confirm">

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_cancel"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/menu/menu_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<item
android:id="@+id/menu_home"
android:title="홈"
android:icon="@drawable/ic_close" />
android:icon="@drawable/ic_home" />
<item
android:id="@+id/menu_list"
android:title="리스트"
android:icon="@drawable/ic_close" />
android:icon="@drawable/ic_list" />
<item
android:id="@+id/menu_setting"
android:title="설정"
android:icon="@drawable/ic_close" />
android:icon="@drawable/ic_setting" />
</menu>