-
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.
🔗 :: (#29) 홈 스크린 퍼블리싱
- Loading branch information
Showing
25 changed files
with
615 additions
and
47 deletions.
There are no files selected for viewing
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
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
15 changes: 0 additions & 15 deletions
15
app/src/main/java/team/retum/jobisandroidv2/navigation/HomeNavigation.kt
This file was deleted.
Oops, something went wrong.
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
17 changes: 17 additions & 0 deletions
17
app/src/main/java/team/retum/jobisandroidv2/root/RootNavigation.kt
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,17 @@ | ||
package team.retum.jobisandroidv2.root | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
|
||
const val NAVIGATION_ROOT = "root" | ||
|
||
fun NavGraphBuilder.root() { | ||
composable(NAVIGATION_ROOT) { | ||
Root() | ||
} | ||
} | ||
|
||
fun NavController.navigateToRoot() { | ||
navigate(NAVIGATION_ROOT) | ||
} |
23 changes: 13 additions & 10 deletions
23
...eam/retum/jobisandroidv2/ui/RootScreen.kt → ...m/retum/jobisandroidv2/root/RootScreen.kt
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,30 +1,33 @@ | ||
package team.retum.jobisandroidv2.ui | ||
package team.retum.jobisandroidv2.root | ||
|
||
import android.annotation.SuppressLint | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Scaffold | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.navigation.NavHostController | ||
import androidx.navigation.compose.NavHost | ||
import androidx.navigation.compose.rememberNavController | ||
import team.retum.jobisandroidv2.navigation.NAVIGATION_HOME | ||
import team.retum.home.navigation.NAVIGATION_HOME | ||
import team.retum.home.navigation.home | ||
import team.retum.jobisandroidv2.ui.BottomNavigationBar | ||
|
||
const val NAVIGATION_ROOT = "root" | ||
|
||
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") | ||
@Composable | ||
fun RootScreen() { | ||
fun Root() { | ||
val navController = rememberNavController() | ||
|
||
RootScreen(navController = navController) | ||
} | ||
|
||
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") | ||
@Composable | ||
private fun RootScreen(navController: NavHostController) { | ||
Scaffold( | ||
bottomBar = { BottomNavigationBar(navController = navController) }, | ||
) { | ||
NavHost( | ||
modifier = Modifier.padding(it), | ||
navController = navController, | ||
startDestination = NAVIGATION_HOME, | ||
) { | ||
// TODO 내비게이션 바 해당 메뉴 스크린 위치 | ||
home() | ||
} | ||
} | ||
} |
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
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 @@ | ||
/build |
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,20 @@ | ||
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed | ||
plugins { | ||
id(libs.plugins.android.library.get().pluginId) | ||
id(libs.plugins.kotlin.android.get().pluginId) | ||
id(libs.plugins.kotlin.kapt.get().pluginId) | ||
id(libs.plugins.hilt.android.get().pluginId) | ||
} | ||
|
||
apply<CommonGradlePlugin>() | ||
apply<ComposeGradlePlugin>() | ||
|
||
android { | ||
namespace = "team.retum.home" | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(project(":core:common")) | ||
implementation(project(":core:domain")) | ||
} |
22 changes: 22 additions & 0 deletions
22
feature/home/src/androidTest/java/team/retum/home/ExampleInstrumentedTest.kt
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,22 @@ | ||
package team.retum.home | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.platform.app.InstrumentationRegistry | ||
import junit.framework.TestCase.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("team.retum.home.test", appContext.packageName) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
feature/home/src/main/java/team/retum/home/navigation/HomeNavigation.kt
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,13 @@ | ||
package team.retum.home.navigation | ||
|
||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import team.retum.home.ui.Home | ||
|
||
const val NAVIGATION_HOME = "home" | ||
|
||
fun NavGraphBuilder.home() { | ||
composable(NAVIGATION_HOME) { | ||
Home() | ||
} | ||
} |
Oops, something went wrong.