-
Notifications
You must be signed in to change notification settings - Fork 23
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
π 4λ¨κ³ - μ₯λ°κ΅¬λ(μλ) #70
base: s9hn
Are you sure you want to change the base?
Conversation
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.
μλ
νμΈμ μΈνλ! μμ£Ό λ°μ μ£Όκ°μ 보λ΄κ³ μ€μ
¨κ΅°μ γ
γ
γ
μ§μ λ¨κ³ 리뷰 λ°μκ³Ό μꡬ μ¬ν ꡬνμ λ무 μ ν΄μ£Όμ
¨μ΅λλ€ π―
μ§μ λ¨κ³κΉμ§ ꡬ쑰λ₯Ό μ μ€κ³ν΄μ£Όμ
μ μ΄λ² λ¨κ³λ ν¬κ² λ릴 νΌλλ°±μ΄ μμλλ°μ,
νΌλλ°± λ°μ μ΄νμ νΉλ³ν λμ ν΄λ³΄κ³ μΆμΌμ κ² μμΌμλ€λ©΄ λ€μ 리뷰 μμ²μμ λ―Έμ μ λ§λ¬΄λ¦¬νκ² μ΅λλ€ π
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.
Q. IconButton λ΄λΆλ₯Ό 보μλλ° Boxλ‘ νλ² λνλμ΄μκ³ , κ²°κ΅ Boxμ Clickable λ©μλλ₯Ό ꡬννκ³ μλλ° Iconλ³΄λ€ μ νΈνμλ μ΄μ κ° μμΌμ κ°μ? CompositionLocalProviderλ₯Ό ν΅ν μ΄λ€ ν΄λ¦ μ΄λ²€νΈ μ΅μ νκ° λμ΄μλμ?
κ°μ₯ ν° ν¨κ³ΌλΌκ³ νλ€λ©΄ Material λμμΈ κ°μ΄λμμ μ΄μΌκΈ°νλ λͺ
μμ μΈ μν μ κ°μ₯ μ½κ² ꡬννλλ‘ λμμ£Όλ κ²μ΄λΌκ³ ν μ μκ² λ€μ.
https://m3.material.io/components/icon-buttons
μλ₯Ό λ€μ΄ Dividerλ λ΄λΆμμ Boxλ₯Ό ꡬννκ³ μλλ°μ, Boxλ₯Ό Modifierλ‘ μ‘°μνλ κ²κ³Ό λ€λ₯΄μ§ μλ€κ³ μκ°ν μ μμ§λ§
λͺ
μμ μΌλ‘ λ μ΄μμμ λλλ λ°μ νμ©νλ μ»΄ν¬λνΈλ₯Ό νμ©νλ κ²μ λ μ νΈν©λλ€.
A divider is a thin line that groups content in lists and layouts.
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class ShoppingListScreenTest { |
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.
μλ―Έ μλ μλ리μ€λ₯Ό μ λ§ μ λμΆν΄μ£Όμ
¨λ€μ π
μ΄μ ν
μ€νΈλ λ νΌλλ°± μ λλ €λ λκ² μ΄μ~
// given: | ||
composeTestRule.apply { | ||
setContent { | ||
ShoppingProductHeader( |
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.
HeaderλΌλ μ΄λ¦μ λ³΄ν΅ νμ΄μ§ μλ¨μ μλ μ 체μ μΈ λ¨Έλ¦ΏκΈμ μΌμ»¬μ λ μ¬μ©νκ³€ νλλ°μ, λ μ μ ν μ΄λ¦μ΄ μμκΉμ?
|
||
@Composable | ||
fun ShoppingListRoute( | ||
onShoppingCartClick: () -> Unit, | ||
onItemClick: (productId: Long) -> Unit, | ||
) { | ||
val products = dummyProducts | ||
var products by remember { mutableStateOf(dummyProducts.updateProducts()) } |
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.
μ΄λ―Έ μ μκ³ κ³μκ² μ§λ§ μ§κΈμ μ μ₯μλ μν κ΄λ¦¬ μΈ‘λ©΄μμ μ μμΌλ‘ κ΄λ¦¬λμ΄ λμ€μ ν° λ¬Έμ λ‘ μ΄μ΄μ§ μ μμ΅λλ€.
μ΄μ΄μ§λ λ―Έμ λ€μμ μ΄λ¬ν μν κ΄λ¦¬λ₯Ό λ μ μ§λ³΄μ κ°λ₯νκ² λ§λλ λ°©λ²μ λν΄ λ€λ£¨κ² λ κ±°μμ π
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class ShoppingProductHeaderTest { |
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.
μ΄ ν μ€νΈ μλ리μ€μ λν΄ μ»΄ν¬λνΈμ Previewλ‘λ λ ΈμΆν΄λ³΄λ©΄ μ΄λ¨κΉμ? PreviewParameterλ₯Ό νμ©ν΄λ³Ό μ μμ κ² κ°μμ!
product = product, | ||
modifier = Modifier.size(size = 156.dp), |
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.
μΈνλμ μ΄λ¬ν Modifierμ λ΄λΆμμ μΊ‘μνλμ΄μΌ νλ μμ±κ³Ό μΈλΆμμ μ£Όμ λμ΄μΌ νλ μμ±μ μ΄λ»κ² ꡬλΆνμλμ?
πππ°π³π¬ ππ¦π΄π€π³πͺπ±π΅πͺπ°π―
π·ππ€π³π¦π¦π―π΄π©π°π΅
22.webm
π¬ππ° ππ¦π·πͺπ¦πΈπ¦π³π΄
νν....... 2024λ κ°μ₯ λ°μ 2μ£Όλ₯Ό 보λ΄κ³ λμμμλλ€.. μ€λλ§μ μ»΄ν¬μ¦νλκΉ λ무 μ¬λ°μ΄μ π
Q. IconButton λ΄λΆλ₯Ό 보μλλ° Boxλ‘ νλ² λνλμ΄μκ³ , κ²°κ΅ Boxμ Clickable λ©μλλ₯Ό ꡬννκ³ μλλ° Iconλ³΄λ€ μ νΈνμλ μ΄μ κ° μμΌμ κ°μ?
CompositionLocalProviderλ₯Ό ν΅ν μ΄λ€ ν΄λ¦ μ΄λ²€νΈ μ΅μ νκ° λμ΄μλμ?
idλ 리μμ€μμ΄λλ₯Ό λ§νλκ±ΈκΉμ?
리μμ€ μμ΄λλΌλ©΄ ν΄λΉ μ»΄ν¬λνΈλ§ μ¬μ©ν λ¬Έμμ΄ κ°μ΄λκΉ μ»΄ν¬λνΈ λ΄λΆκ° μ μ νλ€κ³ μκ°ν©λλ€!
ν΄λΉ String κ°μ λ€κ³ μλ μ΄λ€ μνκ°μ idλ₯Ό λ§μνμ κ±°λΌλ©΄,, μ Composable μ»΄ν¬λνΈλ€μ μ§μ§ UI κ»λ°κΈ° κ·Έ μμ²΄λ‘ μκ°νκΈ°λλ¬Έμ idλΌλ κ°λ³΄λ¨ μ¬μ©μμκ² λ³΄μ¬μ ΈμΌν λ¬Έμμ΄ κ°λ§ μκ³ μμ΄λ μΆ©λΆν κ² κ°μμ!
κ°μμμ λ§μν΄μ£Όμ ¨λλλ‘ μ€μ μ½λμ testλ§μ μν νκ·Έλ₯Ό νκΈ°ν΄μ£Όλ κ² λ§μμ μλ€μμλλ€! κ·Έλμ λͺ¨λ descriptionμΌλ‘ ν΅μΌν μ΄μ μ΄κΈ°λ ν©λλ€!
μ€λ κΈ°λ€λ €μ£Όμ μ κ°μ¬νκ³ μ£μ‘ν©λλ€!
κΌ λκΉμ§ μμνκ² μ΅λλ€ :)