-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
修改构建脚本,完成基本ui框架搭建
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package indi.dmzz_yyhyy.lightnovelreader | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import indi.dmzz_yyhyy.lightnovelreader.ui.LightNovelReaderApp | ||
import indi.dmzz_yyhyy.lightnovelreader.ui.theme.LightNovelReaderTheme | ||
|
||
@AndroidEntryPoint | ||
class MainActivity : ComponentActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
LightNovelReaderTheme { | ||
LightNovelReaderApp() | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package indi.dmzz_yyhyy.lightnovelreader | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class LightNovelReaderApplication : Application() { | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package indi.dmzz_yyhyy.lightnovelreader.ui | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.navigation.NavHostController | ||
import androidx.navigation.compose.NavHost | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.compose.rememberNavController | ||
import indi.dmzz_yyhyy.lightnovelreader.ui.home.HomeScreen | ||
|
||
@Composable | ||
fun LightNovelReaderApp() { | ||
val navController = rememberNavController() | ||
LightNovelReaderNavHost(navController) | ||
} | ||
|
||
@Composable | ||
fun LightNovelReaderNavHost( | ||
navController: NavHostController | ||
) { | ||
NavHost(navController = navController, startDestination = Screen.Home.Reading.route) { | ||
composable(route = Screen.Home.route) { | ||
HomeScreen( | ||
onOpenBook = { | ||
navController.navigate(Screen.Book.Detail.createRoute(it)) | ||
} | ||
) | ||
} | ||
} | ||
} |