⏲️ 공부 시간 09 : 10 ~ 10 : 00
오늘은 수월하게 잘 풀렸당!
https://velog.io/@orinugoori_art/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-CODEKATA-43-%EC%82%BC%EC%B4%9D%EC%82%AC
⏲️공부 시간
10 :50 ~ 13 : 30
14 : 45 ~ 15 : 00
17 : 30 ~ 19 : 00
어제 만든 시안대로 안드로이드 스튜디오에서 xml 파일을 작성했다.
오늘의 난관
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.OrinugooriWorldApp" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources> 이런식으로 res/values/themes 들어가보면 테마xml 파일이 있는데, 여기서 parent가 머터리얼3인데 아마 머터리얼3에 기본적으로 버튼 스타일이 정의되어있는 것같음. 그래서 내가 따로 버튼에 백그라운드를 줘도 무시해버린거였다.kotlin
<style name="Base.Theme.OrinugooriWorldApp" parent="Theme.AppCompat.Light"> 이런식으로 바꿔줌!어제 정해논 value값들이 잘못되었었음
<resources>
<style name="TitleTextView" parent="@android:style/TextAppearance.Medium">
<item name="fontFamily">@font/pretendard_extra_bold</item>
<item name="android:textSize">24sp</item>
<item name="android:gravity">left</item>
</style>
<style name="BoldTextView" parent="@android:style/TextAppearance.Medium">
<item name="fontFamily">@font/pretendard_bold</item>
<item name="android:textSize">13sp</item>
</style>
<style name="LightTextView" parent="@android:style/TextAppearance.Medium">
<item name="fontFamily">@font/pretendard_light</item>
<item name="android:textSize">13sp</item>
<item name="color">#777777</item>
<item name="android:gravity">left</item>
</style>
<style name="ButtonTextView" parent="@android:style/TextAppearance.Medium">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">20sp</item>
<item name="android:stateListAnimator">@null</item>
</style>
이런식으로 styles.xml 파일에 폰트 종류에 따라 알맞은 설정 적용되게 스타일 정의해줌
회원가입 페이지 만드는데 constraintLayout이 고장남
레이아웃 만든 구현한 거 자랑



어제 만든 시안이랑 거의 비슷하게 만들었고,
달라진건 정보보여주는 HomeActivity의 오리너구리가 업드린 자세로 바뀌고,
회색 박스에 넣지않고 그냥 하얀 테두리만 줬다.
나머지는 폰트 크기나 위치같은걸 살짝 더 손봐준듯
Lv1 요구사항
Lv2 요구사항
Lv 3 요구사항
오 엄청 금방 다했당
내가 겪은 고난
putExtra로 엑스트라 넘겨주는 과정에서 값이 제대로 안 넘어감
val etvID = findViewById<EditText>(R.id.etv_login_id)
val userIDStr = etvID.text.toString()
val etvPassword = findViewById<EditText>(R.id.etv_login_password)
val btnLogin = findViewById<Button>(R.id.btn_login)
btnLogin.setOnClickListener {
if (isEmptyInput(etvID) || isEmptyInput(etvPassword)) {
Toast.makeText(this, "아이디,비밀번호를 확인해주세요", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, "로그인 성공", Toast.LENGTH_SHORT).show()
val intent = Intent(this, HomeActivity::class.java)
intent.putExtra("UserID", userIDStr)
startActivity(intent)
}
}
원래 이랬는데 뭘까..하다가 저 userIDStr을 setonClickListener 안쪽으로 넣어줬는데 해결됨
val etvID = findViewById<EditText>(R.id.etv_login_id)
val etvPassword = findViewById<EditText>(R.id.etv_login_password)
val btnLogin = findViewById<Button>(R.id.btn_login)
btnLogin.setOnClickListener {
if (isEmptyInput(etvID) || isEmptyInput(etvPassword)) {
Toast.makeText(this, "아이디,비밀번호를 확인해주세요", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, "로그인 성공", Toast.LENGTH_SHORT).show()
val userIDStr = etvID.text.toString()
val intent = Intent(this, HomeActivity::class.java)
intent.putExtra("UserID", userIDStr)
startActivity(intent)
}
}
요런식으루다가..
이거 빼면 헤멘 부분없는듯?
결과물
