Skip to content

Commit

Permalink
自動フォーマットができた
Browse files Browse the repository at this point in the history
  • Loading branch information
Konayashi committed Nov 28, 2024
1 parent 6d8e586 commit f39bf85
Show file tree
Hide file tree
Showing 8 changed files with 226 additions and 200 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/example/runningavater/MyAppNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ enum class MainScreenTab(

val Context.settingsDataStore by preferencesDataStore(name = "settings")

class MyApplication : Application(){
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
//アプリケーションの初期化構造
// アプリケーションの初期化構造
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ import com.example.runningavater.ui.theme.RunningAvaterTheme
fun InitialFlow1Screen(navController: NavHostController) {
InitialFlowBackground {
Box(
modifier = Modifier
.fillMaxSize()
modifier =
Modifier
.fillMaxSize(),
) {
Column(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
modifier =
Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
) {
Text(
text = "てくてくダイエットへ",
color = Color.Black,
Expand All @@ -51,15 +53,17 @@ fun InitialFlow1Screen(navController: NavHostController) {
Image(
painter = painterResource(id = R.drawable.app_icon),
contentDescription = "App_Icon",
modifier = Modifier
.offset((0.dp), (50.dp))
.size(300.dp),
modifier =
Modifier
.offset((0.dp), (50.dp))
.size(300.dp),
)
}
Column(
modifier = Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 20.dp)
modifier =
Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 20.dp),
) {
NextButton(
navController = navController,
Expand All @@ -70,9 +74,6 @@ fun InitialFlow1Screen(navController: NavHostController) {
}
}




@Preview
@Composable
private fun InitialFlow1Preview() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ import com.example.runningavater.ui.theme.RunningAvaterTheme
fun InitialFlow3Screen(navController: NavController) {
InitialFlowBackground {
Box(
modifier = Modifier
.fillMaxSize()
modifier =
Modifier
.fillMaxSize(),
) {
Column(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
modifier =
Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
Expand All @@ -49,52 +51,60 @@ fun InitialFlow3Screen(navController: NavController) {
}
Column(
modifier =
Modifier
.fillMaxWidth()
.align(Alignment.Center),
Modifier
.fillMaxWidth()
.align(Alignment.Center),
) {
Box(
modifier = Modifier
.size(980.dp),
) {
modifier =
Modifier
.size(980.dp),
) {
Image(
painter = painterResource
painter =
painterResource
(id = R.drawable.initialflow3imghuman),
contentDescription = "initialFlow3Human",
modifier = Modifier
.offset((0.dp), (100.dp))
.size(400.dp),
modifier =
Modifier
.offset((0.dp), (100.dp))
.size(400.dp),
)
}
}
Column (
modifier = Modifier
.fillMaxWidth()
.align(Alignment.Center),
){
Image(
painter = painterResource
(id = R.drawable.initialflow3imgbear),
contentDescription ="InitialFlow3Bear",
modifier = Modifier
.size(200.dp)
.padding(0.dp, 0.dp, 0.dp, 0.dp),
)
Column(
modifier =
Modifier
.fillMaxWidth()
.align(Alignment.Center),
) {
Image(
painter =
painterResource
(id = R.drawable.initialflow3imgbear),
contentDescription = "InitialFlow3Bear",
modifier =
Modifier
.size(200.dp)
.padding(0.dp, 0.dp, 0.dp, 0.dp),
)
}
Column(
modifier = Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 90.dp)
modifier =
Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 90.dp),
) {
NextButton(
navController = navController,
nextDestination = "InitialFlow/4",
)
navController = navController,
nextDestination = "InitialFlow/4",
)
}
Column(
modifier = Modifier
.align(Alignment.BottomEnd)
.padding(20.dp)
modifier =
Modifier
.align(Alignment.BottomEnd)
.padding(20.dp),
) {
BackButton(
navController = navController,
Expand All @@ -104,13 +114,6 @@ fun InitialFlow3Screen(navController: NavController) {
}
}








@Preview
@Composable
private fun InitialFlow3Preview() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ import com.example.runningavater.ui.theme.RunningAvaterTheme
fun InitialFlow4Screen(navController: NavController) {
InitialFlowBackground {
Box(
modifier = Modifier
.fillMaxSize()
modifier =
Modifier
.fillMaxSize(),
) {
Column(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
modifier =
Modifier
.fillMaxWidth()
.align(Alignment.TopCenter)
.padding(0.dp, 50.dp, 0.dp, 0.dp),
horizontalAlignment = Alignment.CenterHorizontally,
){
) {
Text(
text = "一緒にアバターも",
color = Color.Black,
Expand All @@ -52,40 +54,47 @@ fun InitialFlow4Screen(navController: NavController) {
fontSize = 32.sp,
textAlign = TextAlign.Center,
)
Text(text = "(ただし歩かない期間が長いと",
Text(
text = "(ただし歩かない期間が長いと",
color = Color.Black,
fontSize = 18.sp,
modifier = Modifier
.offset((40.dp),(0.dp)),
modifier =
Modifier
.offset((40.dp), (0.dp)),
)
Text(text = "逆に太ってしまうことも...",
Text(
text = "逆に太ってしまうことも...",
color = Color.Black,
fontSize = 18.sp,
modifier = Modifier
.offset((100.dp),(0.dp)),
)
modifier =
Modifier
.offset((100.dp), (0.dp)),
)
Image(
painter = painterResource(id = R.drawable.initialflow4img),
contentDescription = "クマちゃんの変化説明",
modifier = Modifier
.offset((0.dp), (50.dp))
.size(375.dp),
modifier =
Modifier
.offset((0.dp), (50.dp))
.size(375.dp),
)
}
Column(
modifier = Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 90.dp)
modifier =
Modifier
.align(Alignment.BottomStart)
.padding(20.dp, 0.dp, 20.dp, 90.dp),
) {
NextButton(
navController = navController,
nextDestination = "initialFlow/5",
)
}
Column(
modifier = Modifier
.align(Alignment.BottomEnd)
.padding(20.dp)
modifier =
Modifier
.align(Alignment.BottomEnd)
.padding(20.dp),
) {
BackButton(
navController = navController,
Expand All @@ -97,7 +106,7 @@ fun InitialFlow4Screen(navController: NavController) {

@Preview
@Composable
private fun InitialFlow4Preview(){
private fun InitialFlow4Preview() {
RunningAvaterTheme {
InitialFlow4Screen(rememberNavController())
}
Expand Down
Loading

0 comments on commit f39bf85

Please sign in to comment.