From 6e7ce11d7d378c0c172c388fdcc7d9afb0b9cff7 Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 5 Jul 2024 21:31:24 +0900 Subject: [PATCH 1/8] [ADD/#8] bottom nav icon add --- feature/src/main/res/drawable/ic_home.xml | 9 --------- .../res/drawable/ic_nav_calendar_false.xml | 9 +++++++++ .../res/drawable/ic_nav_calendar_true.xml | 9 +++++++++ .../main/res/drawable/ic_nav_home_false.xml | 9 +++++++++ .../main/res/drawable/ic_nav_home_true.xml | 9 +++++++++ .../res/drawable/ic_nav_profile_false.xml | 9 +++++++++ .../main/res/drawable/ic_nav_profile_true.xml | 9 +++++++++ .../main/res/drawable/ic_nav_search_false.xml | 20 +++++++++++++++++++ .../main/res/drawable/ic_nav_search_true.xml | 20 +++++++++++++++++++ 9 files changed, 94 insertions(+), 9 deletions(-) delete mode 100644 feature/src/main/res/drawable/ic_home.xml create mode 100644 feature/src/main/res/drawable/ic_nav_calendar_false.xml create mode 100644 feature/src/main/res/drawable/ic_nav_calendar_true.xml create mode 100644 feature/src/main/res/drawable/ic_nav_home_false.xml create mode 100644 feature/src/main/res/drawable/ic_nav_home_true.xml create mode 100644 feature/src/main/res/drawable/ic_nav_profile_false.xml create mode 100644 feature/src/main/res/drawable/ic_nav_profile_true.xml create mode 100644 feature/src/main/res/drawable/ic_nav_search_false.xml create mode 100644 feature/src/main/res/drawable/ic_nav_search_true.xml diff --git a/feature/src/main/res/drawable/ic_home.xml b/feature/src/main/res/drawable/ic_home.xml deleted file mode 100644 index 6fcd9a120..000000000 --- a/feature/src/main/res/drawable/ic_home.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/feature/src/main/res/drawable/ic_nav_calendar_false.xml b/feature/src/main/res/drawable/ic_nav_calendar_false.xml new file mode 100644 index 000000000..b35d048ff --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_calendar_false.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_calendar_true.xml b/feature/src/main/res/drawable/ic_nav_calendar_true.xml new file mode 100644 index 000000000..f60152d93 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_calendar_true.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_home_false.xml b/feature/src/main/res/drawable/ic_nav_home_false.xml new file mode 100644 index 000000000..4fccbd4f2 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_home_false.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_home_true.xml b/feature/src/main/res/drawable/ic_nav_home_true.xml new file mode 100644 index 000000000..8e048cf97 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_home_true.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_profile_false.xml b/feature/src/main/res/drawable/ic_nav_profile_false.xml new file mode 100644 index 000000000..89ab08810 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_profile_false.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_profile_true.xml b/feature/src/main/res/drawable/ic_nav_profile_true.xml new file mode 100644 index 000000000..7fa350458 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_profile_true.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/src/main/res/drawable/ic_nav_search_false.xml b/feature/src/main/res/drawable/ic_nav_search_false.xml new file mode 100644 index 000000000..d0d438928 --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_search_false.xml @@ -0,0 +1,20 @@ + + + + diff --git a/feature/src/main/res/drawable/ic_nav_search_true.xml b/feature/src/main/res/drawable/ic_nav_search_true.xml new file mode 100644 index 000000000..7022f139e --- /dev/null +++ b/feature/src/main/res/drawable/ic_nav_search_true.xml @@ -0,0 +1,20 @@ + + + + From 993df867da4600b7c56f3d580e84fedbca071830 Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 5 Jul 2024 22:06:23 +0900 Subject: [PATCH 2/8] [ADD/#8] bottom navigation route add --- .../terning/feature/calendar/CalendarRouth.kt | 19 ++++++++++++ .../calendar/navigation/CalendarNavigation.kt | 26 +++++++++++++++++ .../FirstRoute.kt => home/HomeRoute.kt} | 10 +++---- .../navigation/HometNavigation.kt} | 16 +++++----- .../com/terning/feature/main/MainNavigator.kt | 24 +++++++-------- .../com/terning/feature/main/MainScreen.kt | 12 +++++--- .../java/com/terning/feature/main/MainTab.kt | 29 ++++++++++++------- .../feature/{mock => myPage}/MockItem.kt | 2 +- .../{mock => myPage}/MockSideEffect.kt | 2 +- .../feature/{mock => myPage}/MockState.kt | 2 +- .../MockRoute.kt => myPage/MyPageRoute.kt} | 6 ++-- .../MyPageViewModel.kt} | 4 +-- .../navigation/MyPageNavigation.kt} | 16 +++++----- .../com/terning/feature/search/SearchRouth.kt | 19 ++++++++++++ .../search/navigation/SearchNavigation.kt | 25 ++++++++++++++++ ...ile_false.xml => ic_nav_my_page_false.xml} | 0 ...ofile_true.xml => ic_nav_my_page_true.xml} | 0 feature/src/main/res/values/strings.xml | 6 ++-- 18 files changed, 158 insertions(+), 60 deletions(-) create mode 100644 feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt create mode 100644 feature/src/main/java/com/terning/feature/calendar/navigation/CalendarNavigation.kt rename feature/src/main/java/com/terning/feature/{first/FirstRoute.kt => home/HomeRoute.kt} (69%) rename feature/src/main/java/com/terning/feature/{mock/navigation/MockNavigation.kt => home/navigation/HometNavigation.kt} (54%) rename feature/src/main/java/com/terning/feature/{mock => myPage}/MockItem.kt (97%) rename feature/src/main/java/com/terning/feature/{mock => myPage}/MockSideEffect.kt (79%) rename feature/src/main/java/com/terning/feature/{mock => myPage}/MockState.kt (84%) rename feature/src/main/java/com/terning/feature/{mock/MockRoute.kt => myPage/MyPageRoute.kt} (95%) rename feature/src/main/java/com/terning/feature/{mock/MockViewModel.kt => myPage/MyPageViewModel.kt} (92%) rename feature/src/main/java/com/terning/feature/{first/navigation/FirstNavigation.kt => myPage/navigation/MyPageNavigation.kt} (52%) create mode 100644 feature/src/main/java/com/terning/feature/search/SearchRouth.kt create mode 100644 feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt rename feature/src/main/res/drawable/{ic_nav_profile_false.xml => ic_nav_my_page_false.xml} (100%) rename feature/src/main/res/drawable/{ic_nav_profile_true.xml => ic_nav_my_page_true.xml} (100%) diff --git a/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt b/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt new file mode 100644 index 000000000..19c0bc4f9 --- /dev/null +++ b/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt @@ -0,0 +1,19 @@ +package com.terning.feature.calendar + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@Composable +fun CalendarRoute() { + CalendarScreen() +} + +@Composable +fun CalendarScreen() { + Column(modifier = Modifier.fillMaxSize()) { + Text(text = "탐색 스크린") + } +} \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/calendar/navigation/CalendarNavigation.kt b/feature/src/main/java/com/terning/feature/calendar/navigation/CalendarNavigation.kt new file mode 100644 index 000000000..542b876d8 --- /dev/null +++ b/feature/src/main/java/com/terning/feature/calendar/navigation/CalendarNavigation.kt @@ -0,0 +1,26 @@ +package com.terning.feature.calendar.navigation + +import androidx.navigation.NavController +import androidx.navigation.NavGraphBuilder +import androidx.navigation.NavOptions +import androidx.navigation.compose.composable +import com.terning.core.navigation.MainTabRoute +import com.terning.feature.calendar.CalendarRoute +import kotlinx.serialization.Serializable + + +fun NavController.navigateCalendar(navOptions: NavOptions? = null) { + navigate( + route = Calendar, + navOptions = navOptions + ) +} + +fun NavGraphBuilder.calendarNavGraph() { + composable { + CalendarRoute() + } +} + +@Serializable +data object Calendar : MainTabRoute \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/first/FirstRoute.kt b/feature/src/main/java/com/terning/feature/home/HomeRoute.kt similarity index 69% rename from feature/src/main/java/com/terning/feature/first/FirstRoute.kt rename to feature/src/main/java/com/terning/feature/home/HomeRoute.kt index cb68304e1..aa516b623 100644 --- a/feature/src/main/java/com/terning/feature/first/FirstRoute.kt +++ b/feature/src/main/java/com/terning/feature/home/HomeRoute.kt @@ -1,4 +1,4 @@ -package com.terning.feature.first +package com.terning.feature.home import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize @@ -7,13 +7,13 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @Composable -fun FirstRoute() { - FirstScreen() +fun HomeRoute() { + HomeScreen() } @Composable -fun FirstScreen() { +fun HomeScreen() { Column(modifier = Modifier.fillMaxSize()) { - Text(text = "This is FirstScreen") + Text(text = "홈 스크린") } } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/mock/navigation/MockNavigation.kt b/feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt similarity index 54% rename from feature/src/main/java/com/terning/feature/mock/navigation/MockNavigation.kt rename to feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt index 0aef1ddf3..2afb85aa5 100644 --- a/feature/src/main/java/com/terning/feature/mock/navigation/MockNavigation.kt +++ b/feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt @@ -1,25 +1,25 @@ -package com.terning.feature.mock.navigation +package com.terning.feature.home.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute -import com.terning.feature.mock.MockRoute +import com.terning.feature.home.HomeRoute import kotlinx.serialization.Serializable -fun NavController.navigateMock(navOptions: NavOptions? = null) { +fun NavController.navigateHome(navOptions: NavOptions? = null) { navigate( - route = Mock, + route = Home, navOptions = navOptions ) } -fun NavGraphBuilder.mockNavGraph() { - composable { - MockRoute() +fun NavGraphBuilder.homeNavGraph() { + composable { + HomeRoute() } } @Serializable -data object Mock : MainTabRoute \ No newline at end of file +data object Home : MainTabRoute \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt index 4ca92ceec..f15672b2e 100644 --- a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt +++ b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt @@ -9,9 +9,11 @@ import androidx.navigation.NavHostController import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navOptions -import com.terning.feature.first.navigation.First -import com.terning.feature.first.navigation.navigateFirst -import com.terning.feature.mock.navigation.navigateMock +import com.terning.feature.calendar.navigation.navigateCalendar +import com.terning.feature.home.navigation.Home +import com.terning.feature.home.navigation.navigateHome +import com.terning.feature.myPage.navigation.navigateMyPage +import com.terning.feature.search.navigation.navigateSearch class MainNavigator( val navController: NavHostController @@ -20,7 +22,7 @@ class MainNavigator( @Composable get() = navController .currentBackStackEntryAsState().value?.destination - val startDestination = First + val startDestination = Home val currentTab: MainTab? @Composable get() = MainTab.find { tab -> @@ -37,19 +39,13 @@ class MainNavigator( } when (tab) { - MainTab.FIRST -> navController.navigateFirst(navOptions) - MainTab.MOCK -> navController.navigateMock(navOptions) + MainTab.Home -> navController.navigateHome(navOptions) + MainTab.Calendar -> navController.navigateCalendar(navOptions) + MainTab.Search -> navController.navigateSearch(navOptions) + MainTab.MyPage -> navController.navigateMyPage(navOptions) } } - fun navigateToFirst() { - navController.navigateFirst() - } - - fun navigateToMock() { - navController.navigateMock() - } - private fun navigateUp() { navController.navigateUp() } diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index 29167b458..9eea00c5b 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -16,8 +16,10 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.compose.NavHost -import com.terning.feature.first.navigation.firstNavGraph -import com.terning.feature.mock.navigation.mockNavGraph +import com.terning.feature.calendar.navigation.calendarNavGraph +import com.terning.feature.home.navigation.homeNavGraph +import com.terning.feature.myPage.navigation.myPageNavGraph +import com.terning.feature.search.navigation.searchNavGraph @Composable fun MainScreen( @@ -42,8 +44,10 @@ fun MainScreen( navController = navigator.navController, startDestination = navigator.startDestination ) { - firstNavGraph() - mockNavGraph() + homeNavGraph() + calendarNavGraph() + searchNavGraph() + myPageNavGraph() } } } diff --git a/feature/src/main/java/com/terning/feature/main/MainTab.kt b/feature/src/main/java/com/terning/feature/main/MainTab.kt index f579742d7..10ddc8cd2 100644 --- a/feature/src/main/java/com/terning/feature/main/MainTab.kt +++ b/feature/src/main/java/com/terning/feature/main/MainTab.kt @@ -6,24 +6,31 @@ import androidx.compose.runtime.Composable import com.terning.core.navigation.MainTabRoute import com.terning.core.navigation.Route import com.terning.feature.R -import com.terning.feature.first.navigation.First -import com.terning.feature.mock.navigation.Mock - enum class MainTab( @DrawableRes val icon: Int, @StringRes val contentDescription: Int, val route: MainTabRoute, ) { - FIRST( - icon = R.drawable.ic_home, - contentDescription = R.string.first, - route = First + Home( + icon = R.drawable.ic_nav_home_false, + contentDescription = R.string.bottom_nav_home, + route = com.terning.feature.home.navigation.Home + ), + Calendar( + icon = R.drawable.ic_nav_calendar_false, + contentDescription = R.string.bottom_nav_calendar, + route = com.terning.feature.calendar.navigation.Calendar + ), + Search( + icon = R.drawable.ic_nav_search_false, + contentDescription = R.string.bottom_nav_search, + route = com.terning.feature.search.navigation.Search ), - MOCK( - icon = R.drawable.ic_home, - contentDescription = R.string.mock, - route = Mock + MyPage( + icon = R.drawable.ic_nav_my_page_true, + contentDescription = R.string.bottom_nav_my_page, + route = com.terning.feature.myPage.navigation.MyPage ); companion object { diff --git a/feature/src/main/java/com/terning/feature/mock/MockItem.kt b/feature/src/main/java/com/terning/feature/myPage/MockItem.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/mock/MockItem.kt rename to feature/src/main/java/com/terning/feature/myPage/MockItem.kt index 2cd3c9135..5eb1cfd88 100644 --- a/feature/src/main/java/com/terning/feature/mock/MockItem.kt +++ b/feature/src/main/java/com/terning/feature/myPage/MockItem.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mock +package com.terning.feature.myPage import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Row diff --git a/feature/src/main/java/com/terning/feature/mock/MockSideEffect.kt b/feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt similarity index 79% rename from feature/src/main/java/com/terning/feature/mock/MockSideEffect.kt rename to feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt index faf43e51f..daa347efe 100644 --- a/feature/src/main/java/com/terning/feature/mock/MockSideEffect.kt +++ b/feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mock +package com.terning.feature.myPage import androidx.annotation.StringRes diff --git a/feature/src/main/java/com/terning/feature/mock/MockState.kt b/feature/src/main/java/com/terning/feature/myPage/MockState.kt similarity index 84% rename from feature/src/main/java/com/terning/feature/mock/MockState.kt rename to feature/src/main/java/com/terning/feature/myPage/MockState.kt index 92e560987..557cf2a99 100644 --- a/feature/src/main/java/com/terning/feature/mock/MockState.kt +++ b/feature/src/main/java/com/terning/feature/myPage/MockState.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mock +package com.terning.feature.myPage import com.terning.core.state.UiState import com.terning.domain.entity.response.MockResponseModel diff --git a/feature/src/main/java/com/terning/feature/mock/MockRoute.kt b/feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/mock/MockRoute.kt rename to feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt index a9a958ddf..8d775830d 100644 --- a/feature/src/main/java/com/terning/feature/mock/MockRoute.kt +++ b/feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mock +package com.terning.feature.myPage import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -19,8 +19,8 @@ import com.terning.core.state.UiState import com.terning.domain.entity.response.MockResponseModel @Composable -fun MockRoute( - viewModel: MockViewModel = hiltViewModel() +fun MyPageRoute( + viewModel: MyPageViewModel = hiltViewModel() ) { val context = LocalContext.current diff --git a/feature/src/main/java/com/terning/feature/mock/MockViewModel.kt b/feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt similarity index 92% rename from feature/src/main/java/com/terning/feature/mock/MockViewModel.kt rename to feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt index fc95339bb..08b66472e 100644 --- a/feature/src/main/java/com/terning/feature/mock/MockViewModel.kt +++ b/feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mock +package com.terning.feature.myPage import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope @@ -16,7 +16,7 @@ import kotlinx.coroutines.launch import javax.inject.Inject @HiltViewModel -class MockViewModel @Inject constructor(private val repository: MockRepository) : ViewModel() { +class MyPageViewModel @Inject constructor(private val repository: MockRepository) : ViewModel() { private val _state: MutableStateFlow = MutableStateFlow(MockState()) diff --git a/feature/src/main/java/com/terning/feature/first/navigation/FirstNavigation.kt b/feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt similarity index 52% rename from feature/src/main/java/com/terning/feature/first/navigation/FirstNavigation.kt rename to feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt index 3ef921901..5bf303136 100644 --- a/feature/src/main/java/com/terning/feature/first/navigation/FirstNavigation.kt +++ b/feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt @@ -1,25 +1,25 @@ -package com.terning.feature.first.navigation +package com.terning.feature.myPage.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute -import com.terning.feature.first.FirstRoute +import com.terning.feature.myPage.MyPageRoute import kotlinx.serialization.Serializable -fun NavController.navigateFirst(navOptions: NavOptions? = null) { +fun NavController.navigateMyPage(navOptions: NavOptions? = null) { navigate( - route = First, + route = MyPage, navOptions = navOptions ) } -fun NavGraphBuilder.firstNavGraph() { - composable { - FirstRoute() +fun NavGraphBuilder.myPageNavGraph() { + composable { + MyPageRoute() } } @Serializable -data object First : MainTabRoute \ No newline at end of file +data object MyPage : MainTabRoute \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/search/SearchRouth.kt b/feature/src/main/java/com/terning/feature/search/SearchRouth.kt new file mode 100644 index 000000000..18c655555 --- /dev/null +++ b/feature/src/main/java/com/terning/feature/search/SearchRouth.kt @@ -0,0 +1,19 @@ +package com.terning.feature.search + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@Composable +fun SearchRoute() { + SearchScreen() +} + +@Composable +fun SearchScreen() { + Column(modifier = Modifier.fillMaxSize()) { + Text(text = "탐색 스크린") + } +} \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt b/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt new file mode 100644 index 000000000..e11003094 --- /dev/null +++ b/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt @@ -0,0 +1,25 @@ +package com.terning.feature.search.navigation + +import androidx.navigation.NavController +import androidx.navigation.NavGraphBuilder +import androidx.navigation.NavOptions +import androidx.navigation.compose.composable +import com.terning.core.navigation.MainTabRoute +import com.terning.feature.calendar.CalendarRoute +import kotlinx.serialization.Serializable + +fun NavController.navigateSearch(navOptions: NavOptions? = null) { + navigate( + route = Search, + navOptions = navOptions + ) +} + +fun NavGraphBuilder.searchNavGraph() { + composable { + CalendarRoute() + } +} + +@Serializable +data object Search : MainTabRoute \ No newline at end of file diff --git a/feature/src/main/res/drawable/ic_nav_profile_false.xml b/feature/src/main/res/drawable/ic_nav_my_page_false.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_profile_false.xml rename to feature/src/main/res/drawable/ic_nav_my_page_false.xml diff --git a/feature/src/main/res/drawable/ic_nav_profile_true.xml b/feature/src/main/res/drawable/ic_nav_my_page_true.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_profile_true.xml rename to feature/src/main/res/drawable/ic_nav_my_page_true.xml diff --git a/feature/src/main/res/values/strings.xml b/feature/src/main/res/values/strings.xml index 51ab71090..564560740 100644 --- a/feature/src/main/res/values/strings.xml +++ b/feature/src/main/res/values/strings.xml @@ -5,7 +5,9 @@ 서버통신 성공 서버통신 실패 - first - mock + + 캘린더 + 검색 + 마이페이지 \ No newline at end of file From f3878af5752c65a7351efdde69b88282f7577a4c Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 5 Jul 2024 22:14:49 +0900 Subject: [PATCH 3/8] [DESIGN/#8] icon size change --- .../src/main/res/drawable/ic_nav_calendar_false.xml | 10 +++++----- .../src/main/res/drawable/ic_nav_calendar_true.xml | 10 +++++----- feature/src/main/res/drawable/ic_nav_home_false.xml | 10 +++++----- feature/src/main/res/drawable/ic_nav_home_true.xml | 10 +++++----- .../src/main/res/drawable/ic_nav_my_page_false.xml | 10 +++++----- .../src/main/res/drawable/ic_nav_my_page_true.xml | 10 +++++----- .../src/main/res/drawable/ic_nav_search_false.xml | 12 ++++++------ feature/src/main/res/drawable/ic_nav_search_true.xml | 12 ++++++------ feature/src/main/res/values/strings.xml | 2 +- 9 files changed, 43 insertions(+), 43 deletions(-) diff --git a/feature/src/main/res/drawable/ic_nav_calendar_false.xml b/feature/src/main/res/drawable/ic_nav_calendar_false.xml index b35d048ff..18d8a7c30 100644 --- a/feature/src/main/res/drawable/ic_nav_calendar_false.xml +++ b/feature/src/main/res/drawable/ic_nav_calendar_false.xml @@ -1,9 +1,9 @@ + android:width="19dp" + android:height="17dp" + android:viewportWidth="19" + android:viewportHeight="17"> diff --git a/feature/src/main/res/drawable/ic_nav_calendar_true.xml b/feature/src/main/res/drawable/ic_nav_calendar_true.xml index f60152d93..fdd2b3925 100644 --- a/feature/src/main/res/drawable/ic_nav_calendar_true.xml +++ b/feature/src/main/res/drawable/ic_nav_calendar_true.xml @@ -1,9 +1,9 @@ + android:width="18dp" + android:height="17dp" + android:viewportWidth="18" + android:viewportHeight="17"> diff --git a/feature/src/main/res/drawable/ic_nav_home_false.xml b/feature/src/main/res/drawable/ic_nav_home_false.xml index 4fccbd4f2..6fcd9a120 100644 --- a/feature/src/main/res/drawable/ic_nav_home_false.xml +++ b/feature/src/main/res/drawable/ic_nav_home_false.xml @@ -1,9 +1,9 @@ + android:width="18dp" + android:height="18dp" + android:viewportWidth="18" + android:viewportHeight="18"> diff --git a/feature/src/main/res/drawable/ic_nav_home_true.xml b/feature/src/main/res/drawable/ic_nav_home_true.xml index 8e048cf97..d9115bda5 100644 --- a/feature/src/main/res/drawable/ic_nav_home_true.xml +++ b/feature/src/main/res/drawable/ic_nav_home_true.xml @@ -1,9 +1,9 @@ + android:width="18dp" + android:height="18dp" + android:viewportWidth="18" + android:viewportHeight="18"> diff --git a/feature/src/main/res/drawable/ic_nav_my_page_false.xml b/feature/src/main/res/drawable/ic_nav_my_page_false.xml index 89ab08810..9265715c0 100644 --- a/feature/src/main/res/drawable/ic_nav_my_page_false.xml +++ b/feature/src/main/res/drawable/ic_nav_my_page_false.xml @@ -1,9 +1,9 @@ + android:width="18dp" + android:height="18dp" + android:viewportWidth="18" + android:viewportHeight="18"> diff --git a/feature/src/main/res/drawable/ic_nav_my_page_true.xml b/feature/src/main/res/drawable/ic_nav_my_page_true.xml index 7fa350458..971eace11 100644 --- a/feature/src/main/res/drawable/ic_nav_my_page_true.xml +++ b/feature/src/main/res/drawable/ic_nav_my_page_true.xml @@ -1,9 +1,9 @@ + android:width="18dp" + android:height="18dp" + android:viewportWidth="18" + android:viewportHeight="18"> diff --git a/feature/src/main/res/drawable/ic_nav_search_false.xml b/feature/src/main/res/drawable/ic_nav_search_false.xml index d0d438928..ce3fd2fbd 100644 --- a/feature/src/main/res/drawable/ic_nav_search_false.xml +++ b/feature/src/main/res/drawable/ic_nav_search_false.xml @@ -1,17 +1,17 @@ + android:width="20dp" + android:height="20dp" + android:viewportWidth="20" + android:viewportHeight="20"> + android:width="20dp" + android:height="20dp" + android:viewportWidth="20" + android:viewportHeight="20"> 캘린더 - 검색 + 탐색 마이페이지 \ No newline at end of file From 1a4cb7acc6d22546e8aee41112a0a459571386eb Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 5 Jul 2024 22:33:03 +0900 Subject: [PATCH 4/8] [DESIGN/#8] bottom nav color change --- .../com/terning/feature/main/MainScreen.kt | 13 ++++++++++++ .../java/com/terning/feature/main/MainTab.kt | 8 ++++---- ...calendar_false.xml => ic_nav_calendar.xml} | 0 .../res/drawable/ic_nav_calendar_true.xml | 9 --------- ...{ic_nav_home_false.xml => ic_nav_home.xml} | 0 .../main/res/drawable/ic_nav_home_true.xml | 9 --------- ...v_my_page_false.xml => ic_nav_my_page.xml} | 0 .../main/res/drawable/ic_nav_my_page_true.xml | 9 --------- ...nav_search_false.xml => ic_nav_search.xml} | 0 .../main/res/drawable/ic_nav_search_true.xml | 20 ------------------- 10 files changed, 17 insertions(+), 51 deletions(-) rename feature/src/main/res/drawable/{ic_nav_calendar_false.xml => ic_nav_calendar.xml} (100%) delete mode 100644 feature/src/main/res/drawable/ic_nav_calendar_true.xml rename feature/src/main/res/drawable/{ic_nav_home_false.xml => ic_nav_home.xml} (100%) delete mode 100644 feature/src/main/res/drawable/ic_nav_home_true.xml rename feature/src/main/res/drawable/{ic_nav_my_page_false.xml => ic_nav_my_page.xml} (100%) delete mode 100644 feature/src/main/res/drawable/ic_nav_my_page_true.xml rename feature/src/main/res/drawable/{ic_nav_search_false.xml => ic_nav_search.xml} (100%) delete mode 100644 feature/src/main/res/drawable/ic_nav_search_true.xml diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index 9eea00c5b..ccb45229d 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -5,12 +5,16 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding import androidx.compose.material3.Icon +import androidx.compose.material3.LocalAbsoluteTonalElevation +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.NavigationBar import androidx.compose.material3.NavigationBarItem import androidx.compose.material3.Scaffold import androidx.compose.material3.Text +import androidx.compose.material3.surfaceColorAtElevation import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp @@ -82,6 +86,15 @@ private fun MainBottomBar( fontSize = 9.sp ) }, + colors = androidx.compose.material3.NavigationBarItemDefaults + .colors( + // TODO 디자인 시스템 색상으로 변경하기 + selectedIconColor = Color(0xFF1EA65E), + selectedTextColor = Color(0xFF1EA65E), + indicatorColor = MaterialTheme.colorScheme.surfaceColorAtElevation( + LocalAbsoluteTonalElevation.current + ) + ) ) } } diff --git a/feature/src/main/java/com/terning/feature/main/MainTab.kt b/feature/src/main/java/com/terning/feature/main/MainTab.kt index 10ddc8cd2..88ce0806a 100644 --- a/feature/src/main/java/com/terning/feature/main/MainTab.kt +++ b/feature/src/main/java/com/terning/feature/main/MainTab.kt @@ -13,22 +13,22 @@ enum class MainTab( val route: MainTabRoute, ) { Home( - icon = R.drawable.ic_nav_home_false, + icon = R.drawable.ic_nav_home, contentDescription = R.string.bottom_nav_home, route = com.terning.feature.home.navigation.Home ), Calendar( - icon = R.drawable.ic_nav_calendar_false, + icon = R.drawable.ic_nav_calendar, contentDescription = R.string.bottom_nav_calendar, route = com.terning.feature.calendar.navigation.Calendar ), Search( - icon = R.drawable.ic_nav_search_false, + icon = R.drawable.ic_nav_search, contentDescription = R.string.bottom_nav_search, route = com.terning.feature.search.navigation.Search ), MyPage( - icon = R.drawable.ic_nav_my_page_true, + icon = R.drawable.ic_nav_my_page, contentDescription = R.string.bottom_nav_my_page, route = com.terning.feature.myPage.navigation.MyPage ); diff --git a/feature/src/main/res/drawable/ic_nav_calendar_false.xml b/feature/src/main/res/drawable/ic_nav_calendar.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_calendar_false.xml rename to feature/src/main/res/drawable/ic_nav_calendar.xml diff --git a/feature/src/main/res/drawable/ic_nav_calendar_true.xml b/feature/src/main/res/drawable/ic_nav_calendar_true.xml deleted file mode 100644 index fdd2b3925..000000000 --- a/feature/src/main/res/drawable/ic_nav_calendar_true.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/feature/src/main/res/drawable/ic_nav_home_false.xml b/feature/src/main/res/drawable/ic_nav_home.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_home_false.xml rename to feature/src/main/res/drawable/ic_nav_home.xml diff --git a/feature/src/main/res/drawable/ic_nav_home_true.xml b/feature/src/main/res/drawable/ic_nav_home_true.xml deleted file mode 100644 index d9115bda5..000000000 --- a/feature/src/main/res/drawable/ic_nav_home_true.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/feature/src/main/res/drawable/ic_nav_my_page_false.xml b/feature/src/main/res/drawable/ic_nav_my_page.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_my_page_false.xml rename to feature/src/main/res/drawable/ic_nav_my_page.xml diff --git a/feature/src/main/res/drawable/ic_nav_my_page_true.xml b/feature/src/main/res/drawable/ic_nav_my_page_true.xml deleted file mode 100644 index 971eace11..000000000 --- a/feature/src/main/res/drawable/ic_nav_my_page_true.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/feature/src/main/res/drawable/ic_nav_search_false.xml b/feature/src/main/res/drawable/ic_nav_search.xml similarity index 100% rename from feature/src/main/res/drawable/ic_nav_search_false.xml rename to feature/src/main/res/drawable/ic_nav_search.xml diff --git a/feature/src/main/res/drawable/ic_nav_search_true.xml b/feature/src/main/res/drawable/ic_nav_search_true.xml deleted file mode 100644 index b1717ae8e..000000000 --- a/feature/src/main/res/drawable/ic_nav_search_true.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - From 954ab25e3b4f159b19eea78974add52462cdf115 Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 5 Jul 2024 23:57:27 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[FIX/#8]=20Route=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=ED=8C=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/terning/feature/calendar/CalendarRouth.kt | 2 +- .../src/main/java/com/terning/feature/main/MainScreen.kt | 7 +++---- .../terning/feature/search/navigation/SearchNavigation.kt | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt b/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt index 19c0bc4f9..76ef0be7f 100644 --- a/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt +++ b/feature/src/main/java/com/terning/feature/calendar/CalendarRouth.kt @@ -14,6 +14,6 @@ fun CalendarRoute() { @Composable fun CalendarScreen() { Column(modifier = Modifier.fillMaxSize()) { - Text(text = "탐색 스크린") + Text(text = "캘린더 스크린") } } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index ccb45229d..1c605f7f5 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -14,12 +14,12 @@ import androidx.compose.material3.Text import androidx.compose.material3.surfaceColorAtElevation import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.compose.NavHost +import com.terning.core.designsystem.theme.TerningMain import com.terning.feature.calendar.navigation.calendarNavGraph import com.terning.feature.home.navigation.homeNavGraph import com.terning.feature.myPage.navigation.myPageNavGraph @@ -88,9 +88,8 @@ private fun MainBottomBar( }, colors = androidx.compose.material3.NavigationBarItemDefaults .colors( - // TODO 디자인 시스템 색상으로 변경하기 - selectedIconColor = Color(0xFF1EA65E), - selectedTextColor = Color(0xFF1EA65E), + selectedIconColor = TerningMain, + selectedTextColor = TerningMain, indicatorColor = MaterialTheme.colorScheme.surfaceColorAtElevation( LocalAbsoluteTonalElevation.current ) diff --git a/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt b/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt index e11003094..26e2036b6 100644 --- a/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt +++ b/feature/src/main/java/com/terning/feature/search/navigation/SearchNavigation.kt @@ -5,7 +5,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute -import com.terning.feature.calendar.CalendarRoute +import com.terning.feature.search.SearchRoute import kotlinx.serialization.Serializable fun NavController.navigateSearch(navOptions: NavOptions? = null) { @@ -17,7 +17,7 @@ fun NavController.navigateSearch(navOptions: NavOptions? = null) { fun NavGraphBuilder.searchNavGraph() { composable { - CalendarRoute() + SearchRoute() } } From 2d993020f57e83224e543d195a54ac1f2af8b0db Mon Sep 17 00:00:00 2001 From: arinming Date: Sat, 6 Jul 2024 01:16:57 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[FIX/#8]=20MainTabRoute=20Import=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/terning/feature/main/MainNavigator.kt | 12 +++++------ .../com/terning/feature/main/MainScreen.kt | 2 +- .../java/com/terning/feature/main/MainTab.kt | 20 +++++++++++-------- .../feature/{myPage => mypage}/MockItem.kt | 2 +- .../{myPage => mypage}/MockSideEffect.kt | 2 +- .../feature/{myPage => mypage}/MockState.kt | 2 +- .../feature/{myPage => mypage}/MyPageRoute.kt | 6 +++--- .../{myPage => mypage}/MyPageViewModel.kt | 2 +- .../navigation/MyPageNavigation.kt | 4 ++-- 9 files changed, 28 insertions(+), 24 deletions(-) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/MockItem.kt (97%) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/MockSideEffect.kt (79%) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/MockState.kt (84%) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/MyPageRoute.kt (94%) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/MyPageViewModel.kt (98%) rename feature/src/main/java/com/terning/feature/{myPage => mypage}/navigation/MyPageNavigation.kt (85%) diff --git a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt index f15672b2e..a885ac342 100644 --- a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt +++ b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt @@ -12,11 +12,11 @@ import androidx.navigation.navOptions import com.terning.feature.calendar.navigation.navigateCalendar import com.terning.feature.home.navigation.Home import com.terning.feature.home.navigation.navigateHome -import com.terning.feature.myPage.navigation.navigateMyPage +import com.terning.feature.mypage.navigation.navigateMyPage import com.terning.feature.search.navigation.navigateSearch class MainNavigator( - val navController: NavHostController + val navController: NavHostController, ) { private val currentDestination: NavDestination? @Composable get() = navController @@ -39,10 +39,10 @@ class MainNavigator( } when (tab) { - MainTab.Home -> navController.navigateHome(navOptions) - MainTab.Calendar -> navController.navigateCalendar(navOptions) - MainTab.Search -> navController.navigateSearch(navOptions) - MainTab.MyPage -> navController.navigateMyPage(navOptions) + MainTab.HOME -> navController.navigateHome(navOptions) + MainTab.CALENDAR -> navController.navigateCalendar(navOptions) + MainTab.SEARCH -> navController.navigateSearch(navOptions) + MainTab.MY_PAGE -> navController.navigateMyPage(navOptions) } } diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index 1c605f7f5..d274ec7f6 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -22,7 +22,7 @@ import androidx.navigation.compose.NavHost import com.terning.core.designsystem.theme.TerningMain import com.terning.feature.calendar.navigation.calendarNavGraph import com.terning.feature.home.navigation.homeNavGraph -import com.terning.feature.myPage.navigation.myPageNavGraph +import com.terning.feature.mypage.navigation.myPageNavGraph import com.terning.feature.search.navigation.searchNavGraph @Composable diff --git a/feature/src/main/java/com/terning/feature/main/MainTab.kt b/feature/src/main/java/com/terning/feature/main/MainTab.kt index 88ce0806a..4273117a2 100644 --- a/feature/src/main/java/com/terning/feature/main/MainTab.kt +++ b/feature/src/main/java/com/terning/feature/main/MainTab.kt @@ -6,31 +6,35 @@ import androidx.compose.runtime.Composable import com.terning.core.navigation.MainTabRoute import com.terning.core.navigation.Route import com.terning.feature.R +import com.terning.feature.calendar.navigation.Calendar +import com.terning.feature.home.navigation.Home +import com.terning.feature.mypage.navigation.MyPage +import com.terning.feature.search.navigation.Search enum class MainTab( @DrawableRes val icon: Int, @StringRes val contentDescription: Int, val route: MainTabRoute, ) { - Home( + HOME( icon = R.drawable.ic_nav_home, contentDescription = R.string.bottom_nav_home, - route = com.terning.feature.home.navigation.Home + route = Home ), - Calendar( + CALENDAR( icon = R.drawable.ic_nav_calendar, contentDescription = R.string.bottom_nav_calendar, - route = com.terning.feature.calendar.navigation.Calendar + route = Calendar ), - Search( + SEARCH( icon = R.drawable.ic_nav_search, contentDescription = R.string.bottom_nav_search, - route = com.terning.feature.search.navigation.Search + route = Search ), - MyPage( + MY_PAGE( icon = R.drawable.ic_nav_my_page, contentDescription = R.string.bottom_nav_my_page, - route = com.terning.feature.myPage.navigation.MyPage + route = MyPage ); companion object { diff --git a/feature/src/main/java/com/terning/feature/myPage/MockItem.kt b/feature/src/main/java/com/terning/feature/mypage/MockItem.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/myPage/MockItem.kt rename to feature/src/main/java/com/terning/feature/mypage/MockItem.kt index 5eb1cfd88..68189056b 100644 --- a/feature/src/main/java/com/terning/feature/myPage/MockItem.kt +++ b/feature/src/main/java/com/terning/feature/mypage/MockItem.kt @@ -1,4 +1,4 @@ -package com.terning.feature.myPage +package com.terning.feature.mypage import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Row diff --git a/feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt b/feature/src/main/java/com/terning/feature/mypage/MockSideEffect.kt similarity index 79% rename from feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt rename to feature/src/main/java/com/terning/feature/mypage/MockSideEffect.kt index daa347efe..c205854f0 100644 --- a/feature/src/main/java/com/terning/feature/myPage/MockSideEffect.kt +++ b/feature/src/main/java/com/terning/feature/mypage/MockSideEffect.kt @@ -1,4 +1,4 @@ -package com.terning.feature.myPage +package com.terning.feature.mypage import androidx.annotation.StringRes diff --git a/feature/src/main/java/com/terning/feature/myPage/MockState.kt b/feature/src/main/java/com/terning/feature/mypage/MockState.kt similarity index 84% rename from feature/src/main/java/com/terning/feature/myPage/MockState.kt rename to feature/src/main/java/com/terning/feature/mypage/MockState.kt index 557cf2a99..d43e66aa2 100644 --- a/feature/src/main/java/com/terning/feature/myPage/MockState.kt +++ b/feature/src/main/java/com/terning/feature/mypage/MockState.kt @@ -1,4 +1,4 @@ -package com.terning.feature.myPage +package com.terning.feature.mypage import com.terning.core.state.UiState import com.terning.domain.entity.response.MockResponseModel diff --git a/feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt b/feature/src/main/java/com/terning/feature/mypage/MyPageRoute.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt rename to feature/src/main/java/com/terning/feature/mypage/MyPageRoute.kt index 8d775830d..f72da0835 100644 --- a/feature/src/main/java/com/terning/feature/myPage/MyPageRoute.kt +++ b/feature/src/main/java/com/terning/feature/mypage/MyPageRoute.kt @@ -1,4 +1,4 @@ -package com.terning.feature.myPage +package com.terning.feature.mypage import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -20,7 +20,7 @@ import com.terning.domain.entity.response.MockResponseModel @Composable fun MyPageRoute( - viewModel: MyPageViewModel = hiltViewModel() + viewModel: MyPageViewModel = hiltViewModel(), ) { val context = LocalContext.current @@ -53,7 +53,7 @@ fun MyPageRoute( @Composable fun MockScreen( - mockList: List + mockList: List, ) { LazyColumn( modifier = Modifier diff --git a/feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt b/feature/src/main/java/com/terning/feature/mypage/MyPageViewModel.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt rename to feature/src/main/java/com/terning/feature/mypage/MyPageViewModel.kt index 08b66472e..79a3a9eff 100644 --- a/feature/src/main/java/com/terning/feature/myPage/MyPageViewModel.kt +++ b/feature/src/main/java/com/terning/feature/mypage/MyPageViewModel.kt @@ -1,4 +1,4 @@ -package com.terning.feature.myPage +package com.terning.feature.mypage import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope diff --git a/feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt b/feature/src/main/java/com/terning/feature/mypage/navigation/MyPageNavigation.kt similarity index 85% rename from feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt rename to feature/src/main/java/com/terning/feature/mypage/navigation/MyPageNavigation.kt index 5bf303136..f7b36900d 100644 --- a/feature/src/main/java/com/terning/feature/myPage/navigation/MyPageNavigation.kt +++ b/feature/src/main/java/com/terning/feature/mypage/navigation/MyPageNavigation.kt @@ -1,11 +1,11 @@ -package com.terning.feature.myPage.navigation +package com.terning.feature.mypage.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute -import com.terning.feature.myPage.MyPageRoute +import com.terning.feature.mypage.MyPageRoute import kotlinx.serialization.Serializable fun NavController.navigateMyPage(navOptions: NavOptions? = null) { From c6696c0044845a6600ecb19e6c4ade020ec596a4 Mon Sep 17 00:00:00 2001 From: arinming Date: Sat, 6 Jul 2024 01:36:52 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[FEAT/#8]=20NoRippleInteractionSource=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/terning/feature/main/MainScreen.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index d274ec7f6..b0d3f9d2c 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -1,6 +1,8 @@ package com.terning.feature.main import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.interaction.Interaction +import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding @@ -24,6 +26,8 @@ import com.terning.feature.calendar.navigation.calendarNavGraph import com.terning.feature.home.navigation.homeNavGraph import com.terning.feature.mypage.navigation.myPageNavGraph import com.terning.feature.search.navigation.searchNavGraph +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.emptyFlow @Composable fun MainScreen( @@ -70,6 +74,7 @@ private fun MainBottomBar( NavigationBar { tabs.forEach { itemType -> NavigationBarItem( + interactionSource = NoRippleInteractionSource, selected = currentTab == itemType, onClick = { onTabSelected(itemType) @@ -94,8 +99,19 @@ private fun MainBottomBar( LocalAbsoluteTonalElevation.current ) ) + ) } } } } + + +private object NoRippleInteractionSource : MutableInteractionSource { + + override val interactions: Flow = emptyFlow() + + override suspend fun emit(interaction: Interaction) {} + + override fun tryEmit(interaction: Interaction) = true +} \ No newline at end of file From 5bf385abb1ee330a1e47628d2cd612f700685b0d Mon Sep 17 00:00:00 2001 From: arinming Date: Sat, 6 Jul 2024 01:43:53 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[DESIGN/#8]=20=EB=B0=94=ED=85=80=20?= =?UTF-8?q?=EB=B0=94=20=EB=B0=B0=EA=B2=BD=EC=83=89,=20indicatorColor=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/terning/feature/main/MainScreen.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index b0d3f9d2c..257bf2e23 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -21,7 +21,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.compose.NavHost +import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningMain +import com.terning.core.designsystem.theme.White import com.terning.feature.calendar.navigation.calendarNavGraph import com.terning.feature.home.navigation.homeNavGraph import com.terning.feature.mypage.navigation.myPageNavGraph @@ -71,7 +73,7 @@ private fun MainBottomBar( AnimatedVisibility( visible = isVisible, ) { - NavigationBar { + NavigationBar(containerColor = White) { tabs.forEach { itemType -> NavigationBarItem( interactionSource = NoRippleInteractionSource, @@ -95,9 +97,9 @@ private fun MainBottomBar( .colors( selectedIconColor = TerningMain, selectedTextColor = TerningMain, - indicatorColor = MaterialTheme.colorScheme.surfaceColorAtElevation( - LocalAbsoluteTonalElevation.current - ) + unselectedIconColor = Grey300, + unselectedTextColor = Grey300, + indicatorColor = White ) )