Skip to content

Commit

Permalink
Merge pull request #11 from shncder/feature/mainImage-7
Browse files Browse the repository at this point in the history
refactor: 로딩과정 수정(#5)
  • Loading branch information
taewooyo committed May 25, 2022
2 parents aaed6b0 + 4775204 commit bd65ae9
Showing 1 changed file with 40 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,53 +41,56 @@ fun LoadMainImage() {
contentScale = ContentScale.FillBounds
)
if (painterState is ImagePainter.State.Loading) {
CircularProgressIndicator()
CircularProgressIndicator(
modifier = Modifier.align(Alignment.Center)
)
} else if (painterState is ImagePainter.State.Error) {
Image(
painter = painterResource(id = R.drawable.ic_error),
contentDescription = "Error Image",
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.FillBounds
)
}
Text(
text = "슬기로운\n자연생활",
modifier = Modifier
.padding(start = 16.dp, bottom = 279.dp, top = 32.dp, end = 90.dp)
.height(96.dp)
.width(254.dp),
style = MaterialTheme.typography.h4,
lineHeight = 48.sp,
color = Color(0xff010101)
)
Text(
text = "에어비앤비가 엄선한\n위시리스트를 만나보세요",
modifier = Modifier
.padding(start = 16.dp, bottom = 225.dp, top = 136.dp, end = 90.dp)
.height(46.dp)
.width(254.dp),
style = MaterialTheme.typography.body1,
lineHeight = 23.sp,
color = Color(0xff010101),
)
Box(
modifier = Modifier
.padding(start = 16.dp, bottom = 165.dp, top = 206.dp, end = 90.dp)
.clip(RoundedCornerShape(10.dp)) // padding 이후, height,width 이전에 써줘야함
.height(36.dp)
.width(154.dp)
.background(Color(0xff333333)),
) {
} else if (painterState is ImagePainter.State.Success) {
Text(
text = "여행\r아이디어\r얻기",
style = MaterialTheme.typography.button,
text = "슬기로운\n자연생활",
modifier = Modifier
.padding(start = 16.dp, end = 16.dp, top = 8.dp, bottom = 8.dp)
.height(20.dp)
.width(122.dp),
lineHeight = 20.sp,
color = Color(0xffffffff),
.padding(start = 16.dp, bottom = 279.dp, top = 32.dp, end = 90.dp)
.height(96.dp)
.width(254.dp),
style = MaterialTheme.typography.h4,
lineHeight = 48.sp,
color = Color(0xff010101)
)
Text(
text = "에어비앤비가 엄선한\n위시리스트를 만나보세요",
modifier = Modifier
.padding(start = 16.dp, bottom = 225.dp, top = 136.dp, end = 90.dp)
.height(46.dp)
.width(254.dp),
style = MaterialTheme.typography.body1,
lineHeight = 23.sp,
color = Color(0xff010101),
)
Box(
modifier = Modifier
.padding(start = 16.dp, bottom = 165.dp, top = 206.dp, end = 90.dp)
.clip(RoundedCornerShape(10.dp))
.height(36.dp)
.width(154.dp)
.background(Color(0xff333333)),
) {
Text(
text = "여행 아이디어 얻기",
style = MaterialTheme.typography.button,
modifier = Modifier
.padding(start = 16.dp, end = 16.dp, top = 8.dp, bottom = 8.dp)
.height(20.dp)
.width(122.dp),
lineHeight = 20.sp,
color = Color(0xffffffff),
)
}
}
}
}

0 comments on commit bd65ae9

Please sign in to comment.