Week5: Meeting With Mento - boostcampwm-2021/android05-boomerang GitHub Wiki

Android05 KotlinIsGood W5 ๋ฉ˜ํ† ๋งŒ๋‚จ

Quetion

RecyclerView Item์˜ ViewModel ์ฐธ์กฐ

RecyclerView์˜ ์•„์ดํ…œ์— ํŠน์ • ๋ทฐ์˜ ํ‘œ์‹œ ์—ฌ๋ถ€๋ฅผ ViewModel์˜ LiveData๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ Visible/Gone์ด ๊ฒฐ์ •๋˜๋Š”๋ฐ Item์—์„œ๋Š” ์–ด๋–ป๊ฒŒ ์ฐธ์กฐ๋ฅผ ํ•ด์•ผํ• ์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. ์ผ๋‹จ ํ˜„์žฌ๋Š” Adapter์— ํ•ด๋‹น LiveData๋ฅผ ์ƒ์„ฑ์ž๋กœ ๋„ฃ์–ด Viewholder์—์„œ bindํ• ๋•Œ data๋กœ ๋„˜๊ฒจ์ฃผ๋Š” ํ˜•ํƒœ๋กœ ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค.

StaggeredGridLayout

StaggeredGridLayout์„ ์‚ฌ์šฉํ•˜๋ฉด ๋‹ค์–‘ํ•œ ํฌ๊ธฐ์˜ ์•„์ดํ…œ ๋ทฐ๊ฐ€ ์ƒ์„ฑ๋˜๋Š”๋ฐ ๊ทธ์— ๋”ฐ๋ผ ์Šคํฌ๋กค ์‹œ ์•„์ดํ…œ์ด ํฌ์ง€์…˜์ด ๋ฐ”๋€Œ๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋นˆ๋ฒˆํ•œ๋ฐ ์ด ๋ถ€๋ถ„์„ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค. StaggeredGridLayout strategy๋ฅผ GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS๋กœ ์„ค์ •์„ ํ–ˆ๋Š”๋ฐ ์ด๋ถ€๋ถ„ ๋•Œ๋ฌธ์— item์˜ ์ˆœ์„œ?๊ฐ€ ๋ฐ”๋€Œ๋Š” ๊ฒƒ์€ ์ดํ•ด๊ฐ€ ์•ˆ๋ผ์„œ ์—ฌ์ญค๋ด…๋‹ˆ๋‹ค.

HomeFragment IO

HomeFragment๋Š” ๊ธฐ์กด์— onViewCreated()์—์„œ DB์˜ ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๋Š” IO๋ฅผ ์ˆ˜ํ–‰ํ•˜์˜€์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋•ŒonBackPressed์™€ ๊ฐ™์ด ๋’ค๋กœ ๋Œ์•„๊ฐ€์„œ Fragment๋ฅผ ๋‹ค์‹œ ๋ถˆ๋Ÿฌ์™”์„ ๋•Œ๋„ IO ์ž‘์—…์ด ์‹คํ–‰๋˜์–ด ์ด๋Š” ๋‚ญ๋น„๋ผ๊ณ  ์ƒ๊ฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ ์–ด๋–ค ๋Œ€์•ˆ์ด ์žˆ์„์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

  • ๋Œ€์•ˆ: HomeFragment์—์„œ navigation ์ปดํฌ๋„ŒํŠธ์˜ args๋ฅผ ๋ฐ›์•„ ์ˆ˜์ • ์—ฌ๋ถ€์— ๋”ฐ๋ผ args๋ฅผ ๋‹ค๋ฅด๊ฒŒ ๋ฐ›๋„๋ก ํ•˜์—ฌ ํŠน์ • args์—์„œ๋งŒ IO ์ž‘์—… ์‹คํ–‰
  • ๋Œ€์•ˆ2: StateFlow ์‚ฌ์šฉ (์ž˜ ๋ชจ๋ฆ„)

๋ณ€๊ฒฝ ์‚ฌํ•ญ

UI/UX ์ˆ˜์ •

  • ๋„ค๋น„๊ฒŒ์ด์…˜ ๋“œ๋กœ์–ด
    • ๋ฉ”๋ชจ๋ฅผ ์ข…๋ฅ˜๋ณ„๋กœ ๋ณผ ์ˆ˜ ์žˆ์Œ
    • ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด์„ ์Šค

์ „์ฒด์ ์ธ ์™„์„ฑ๋„

๋…ธ์…˜

๋ฒ„์ „ ํƒœ๊ทธ ์˜ฌ๋ฆฌ๋Š” ์ด์œ 

์—…๋ฐ์ดํŠธ ํ•  ์ˆ˜ ์žˆ์„์ง€, ์ด์ „๊ณผ ๋™์ผํ•œ ๋ฒ„์ „์ด๋ฉด ์•ฑ ์—…๋ฐ์ดํŠธ ์„ค์น˜๊ฐ€ ์•ˆ๋˜๋ฏ€๋กœ ๋ฌด์กฐ๊ฑด ๋ฒ„์ „์„ ์˜ฌ๋ ค์„œ ๋ณด๋‚ด์•ผํ•จ

version name vs version code

ex) 1.0.0 vs 1234567 ์ฐจ์ด:

  • Version name
    • ์‚ฌ๋žŒ์ด ์ธ์ง€ํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ’
  • Version code
    • ๊ธฐ๊ธฐ๊ฐ€ ์ดํ•ดํ•˜๋Š” ๊ฐ’
    • ๋ฌด์กฐ๊ฑด 1 ์ด์ƒ ์”ฉ ์ฆ๊ฐ€ ํ•„์š”

๋ฐœํ‘œ ๋ฐฉ๋ฒ•, ํ๋ฆ„

  1. ๊ฐ„๋‹จํ•œ ์„œ๋น„์Šค ์†Œ๊ฐœ
    1. ์™œ ๋น„๋””์˜ค ๋ฉ”๋ชจ, ์Œ์„ฑ๋ฉ”๋ชจ๋ฅผ ์„ ํƒํ•˜์˜€๋Š”์ง€
  2. ๋น„๋””์˜ค ๋ฉ”๋ชจ๋ฅผ ์œ„ํ•ด ๋– ์˜ฌ๋ฆฐ ๋ฐฉ๋ฒ• - 3๊ฐ€์ง€
    1. ์ขŒํ‘œ - ํฌ์ธํŠธ, ์‹œ๊ฐ„ ์ €์žฅํ•ด์„œ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋ณด์—ฌ์ง€๋Š” ๊ฑฐ
    2. PIP - ์ขŒํ‘œ๋ฅผ ์˜์ƒ์œผ๋กœ ๊ฐœ์„ 
    3. ํ”„๋ ˆ์ž„
  3. 2๊ฐ€์ง€๋ฅผ ์„ ํƒํ•˜๊ฒŒ ๋œ ๊ณ„๊ธฐ
  4. ๋ชจ๋‘์˜ ๋ฉ”๋ชจ ๊ฐœ๋ฐœํ•˜๋ฉฐ ์ƒ๊ธด ๋ฌธ์ œ์ , ํ•ด๊ฒฐ๋ฐฉ๋ฒ•
  5. ๋‚˜๋งŒ์˜ ๋ฉ”๋ชจ ๊ฐœ๋ฐœํ•˜๋ฉฐ ์ƒ๊ธด ๋ฌธ์ œ์ , ํ•ด๊ฒฐ๋ฐฉ๋ฒ•
  6. ์Œ์„ฑ ๋ฉ”๋ชจ ๊ฐœ๋ฐœํ•˜๋ฉฐ ์ƒ๊ธด ๋ฌธ์ œ์ , ํ•ด๊ฒฐ๋ฐฉ๋ฒ•
  7. ํ˜‘์—…, ๋ธŒ๋žœ์น˜, ๋…ธ์…˜, issue/error๊ด€๋ฆฌ ๊นƒํ—ˆ๋ธŒ์— ๋Œ€ํ•ด์„œ๋„ ํฌํ•จํ•˜๋ฉด ์˜๋ฏธ์žˆ๋‹ค -> ๋น„์ค‘์žˆ๊ฒŒ
  8. ํ”„๋กœ์ ํŠธ๋ฅผ ํ†ตํ•ด ์–ป์€ ์  ์ •๋ฆฌ
  9. Q&A (์˜ˆ์ƒ์งˆ๋ฌธ)
    1. PPT ์ค€๋น„ -> ๋งŽ์ด ์ค€๋น„ํ–ˆ์Œ์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•œ ๋ฐฉ๋ฒ• ์ค‘ 1

๋ฐœํ‘œ์‹œ๊ฐ„ - ๋‹ค ์ค€๋น„, ์‹œ๊ฐ„์ด ๋ถ€์กฑํ•˜๋‹ค ํŒ๋‹จ -> ๋ณ„์ฒจ๋ชฉ๋ก, ๋ถ€์กฑํ•˜๋ฉด Q&A ์งˆ๋ฌธ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค Life Cycle ๊ณ ๋‚œ ๊ฒฝํ—˜

ํ…Œ์ŠคํŠธ์ฝ”๋“œ

  • Android Test ๋ฐฉ๋ฒ•

Test๋ณด๋‹ค Lint Lint ์ˆ˜์น˜ ์ค„์ธ ๊ฒƒ์— ๋Œ€ํ•œ ์ž๋ฃŒ -> APK ์‚ฌ์ด์ฆˆ ์ค„์–ด๋“ฆ

Test -> Clean Architecture Repo, Datasource, ViewModel ์„ ๋จผ์ € Test Code ์ž‘์„ฑ ํ›„ Activity/Fragment ์‹œํ–‰ Test Coverage ์„ ์ธก์ • ํ›„์ธก์ •ํ•ด์„œ ๋น„๊ต

๋ชฉ๋ก ๋นˆ ํ™”๋ฉด ๋Œ€์‘ ๋‹คํฌ๋ชจ๋“œ (์•„์ด์ฝ˜, ์ปฌ๋Ÿฌ)

์ง„ํ–‰, ์–ดํˆฌ๋Š” ๋” ํŽธํ•˜๊ฒŒ, BackLog ์ง„ํ–‰๊ณผ์ •์„ ๋ชป๋ณธ ๊ฒŒ ์•„์‰ฝ๋‹ค.