-
Notifications
You must be signed in to change notification settings - Fork 8
1주차 미션/1조 이강준 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: acturus0162
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| package com.example.kuit7 | ||
| import android.os.Bundle | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.activity.compose.setContent | ||
| import androidx.activity.enableEdgeToEdge | ||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.border | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Scaffold | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.draw.clip | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.unit.dp | ||
| import com.example.kuit7.ui.theme.KUIT7week1Theme | ||
| class missionActivity :ComponentActivity(){ | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| enableEdgeToEdge() | ||
| setContent { | ||
| KUIT7week1Theme { | ||
| Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> | ||
| Box( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 박스가 카드 배치와 카드 테두리를 정의를 동시에 하고 있어요. |
||
| Modifier.padding(innerPadding) | ||
| .padding(50.dp) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 박스 내부 컴포넌트의 배치는 패딩의 여백으로 밀어서 하기보다는 contentAlignment 파라미터를 활용해 보시기 바랍니다! |
||
| .border( | ||
| width = 2.dp, | ||
| color = Color.Black, | ||
| shape = RoundedCornerShape(size = 20.dp) | ||
| ) | ||
| ) { | ||
| Column( | ||
| Modifier.padding(50.dp), | ||
| verticalArrangement = Arrangement.spacedBy(20.dp) | ||
| ) { | ||
| Image( | ||
| painter = painterResource(id = R.drawable.pfimg), | ||
| contentDescription = "프로필 이미지", | ||
| modifier = Modifier.size(60.dp) | ||
| .clip(RoundedCornerShape(15.dp)) | ||
| ) | ||
| Text("이름 : 이강준") | ||
| Text("학번 : 202312363") | ||
| Text("학과 : 컴퓨터공학부") | ||
| Text("생년월일 : 2003/11/06") | ||
|
|
||
| //ctrl alt l ,alt shift o | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
액티비티 자체를 다시 만들 필요 없이 Scaffold 내부에 구현하신 부분을 실습했던 것처럼 MainActivity에 넣는 등의 방식으로 수행해 주심 됩니다~