๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๊ณณ๊ฐ„์—์„œ ์ธ์‹ฌ๋‚œ๋‹ค/์‹ค๋ฌด

(20)
[Android][Open Source License] ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด์„ผ์Šค ๋ฆฌ์ŠคํŠธ ์ œ๊ณต ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฌธ์ œ ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด์„ผ์Šค ๋ฆฌ์ŠคํŠธ๋ฅผ ์‚ฌ์šฉ์ž์—๊ฒŒ ์ œ๊ณตํ•ด์•ผ ํ•œ๋‹ค. ์‰ฌ์šด ๋ฐฉ๋ฒ• ์—†๋‚˜? ์•Œ๊ฒŒ๋œ ๊ฒƒ ๊ตฌ๊ธ€ ํ”Œ๋ ˆ์ด์—์„œ ์˜คํ”ˆ์†Œ์Šค ์ž๋™์œผ๋กœ ํ‘œ์‹œํ•ด์ฃผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์žˆ์Œ https://developers.google.com/android/guides/opensource?hl=ko ์˜คํ”ˆ์†Œ์Šค ๊ณ ์ง€ ํฌํ•จ | Google Play services | Google for Developers ์ด ํŽ˜์ด์ง€๋Š” Cloud Translation API๋ฅผ ํ†ตํ•ด ๋ฒˆ์—ญ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. Switch to English ์˜คํ”ˆ์†Œ์Šค ๊ณ ์ง€ ํฌํ•จ ์ปฌ๋ ‰์…˜์„ ์‚ฌ์šฉํ•ด ์ •๋ฆฌํ•˜๊ธฐ ๋‚ด ํ™˜๊ฒฝ์„ค์ •์„ ๊ธฐ์ค€์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ €์žฅํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜์„ธ์š”. Google Play ์„œ๋น„์Šค์—๋Š” developers.google.com ์ง„์งœ ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฝ๋‹ค. ์ •๋ง ํŽธํ•˜๋‹ค.
[Android][TextView] marquee ์„ค์ • ๋ฌธ์ œ TextView์˜ marquee ์„ค์ • ๊ฐ’์ด ๋จนํžˆ์งˆ ์•Š์Œ android:ellipsize="marquee" ์™œ ์•ˆ ๋จนํž๊นŒ... ์ฐธ๊ณ  https://stackoverflow.com/questions/3332924/textview-marquee-not-working
[Android][Java] ์ดˆ์„ฑ ๊ฒ€์ƒ‰ ๋ฌธ์ œ ์ดˆ์„ฑ ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์ด ํ•„์š”ํ•˜๋‹ค ์ถœ์ฒ˜ https://milkissboy.tistory.com/32 https://jhb.kr/122 ๋‘ ๋ฒˆ์งธ ์ถœ์ฒ˜๋ฅผ ์‚ฌ์šฉํ–ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ™‡‍โ™€๏ธ๐Ÿ™‡‍โ™€๏ธ๐Ÿ™‡‍โ™€๏ธ ์›์ž‘์ž๋ถ„ ํ‰์•ˆํ•˜์‹œ๊ณ  ๊ฑด๊ฐ•ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[Android][Compose] Compose Canvas๋ฅผ ์ด์šฉํ•ด์„œ Dot Indicator ๋งŒ๋“ค๊ธฐ ๋ชฉ์  Compose์˜ Canvas๋ฅผ ์ด์šฉํ•ด์„œ View Pager์™€ ๊ฐ™์ด ์“ธ Dot Indicator ๋งŒ๋“ค๊ธฐ. ์š”๊ตฌ์‚ฌํ•ญ R_1. ์ด ์ธ๋””์ผ€์ดํ„ฐ๋Š” modifier.align ์„ ํ†ตํ•ด ์„ผํ„ฐ ์ •๋ ฌ์„ ํ•œ๋‹ค. R_2. dot์€ ๊ธฐ๋ณธ์œผ๋กœ ์›ํ˜•์ด๋‹ค. ํ˜„์žฌ ํŽ˜์ด์ง€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” dot์€ ๊ฐ€๋กœ๋กœ ๊ธธ์ญ‰ํ•˜๊ฒŒ ๋Š˜์–ด์ ธ ์žˆ๋Š” ๋ผ์šด๋“œ์ฒ˜๋ฆฌ๋œ ์ง์‚ฌ๊ฐํ˜•์ด๋‹ค. ์ฝ”๋“œ / ๊ตฌํ˜„ @Composable fun BoxScope.DotIndicator( modifier: Modifier = Modifier, pagerState: PagerState, dotSpace: Dp = 4.dp, dotSize : Dp = 5.dp, currentDotWidth : Dp = 12.dp, listSize: Int, currentPageDotColor: Color =..
[Android][DataStore] DataStore ๋™๊ธฐ์ ์œผ๋กœ ์“ฐ๊ธฐ ์ฐธ๊ณ  https://developer.android.com/topic/libraries/architecture/datastore#synchronous ๋ชฉํ‘œ DataStore์˜ ์ €์žฅ ๊ฐ’์„ suspend fun ๋ฐ”๊นฅ์—์„œ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ์‹ถ์—ˆ๋‹ค. (์ด๊ฑด ๊ฒฐ๊ตญ์—” DataStore๋ฅผ ๋™๊ธฐ์ ์œผ๋กœ ์“ฐ๊ณ  ์‹ถ๋‹ค๋Š” ์˜๋ฏธ๋ผ์„œ ์ œ๋ชฉ์„ ๊ทธ๋ ‡๊ฒŒ ๋„ฃ์—ˆ๋‹ค) ๊ธฐ์กด runBlocking์„ ์จ์„œ DataStore์˜ ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๊ธฐ๋Š” ํ–ˆ์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ runBlocking์ด UI thread๋ฅผ blockํ•˜๋Š” ๊ฑฐ๋ผ ANR ๋ฐœ์ƒ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค๊ณ  ํ•˜๋‹ˆ๊นŒ, ๊ณต์‹๋ฌธ์„œ๋ฅผ ์‚ดํŽด๋ณธ๋‹ค. ๊ณต์‹ ๋ฌธ์„œ ํ™•์ธ ์—ฌ๊ธฐ๋ณด๋ฉด DataStore๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ํ”„๋ฆฌ๋กœ๋”ฉํ•˜๋ฉด ANR ์ด์Šˆ๋ฅผ ์ค„์ผ ์ˆ˜๋Š” ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค. ๊ฒฐ๊ณผ ๊ณต์‹ ๋ฌธ์„œ์—์„œ ์•Œ๋ ค์ฃผ๋Š” ๋ฐฉ๋ฒ• 1. runBlocking์„ ์จ๋ผ. 2..
[Android]์•ฑ ๋นŒ๋“œ ์„ค์ • - zero base ํ”„๋กœ์ ํŠธ ๊ฐœ๋ฐœ ์‹œ ๋‚ด์šฉ ์ •๋ฆฌ์˜ ํ•„์š”์„ฑ์„ ๋Š๋‚€ ๊ฒƒ๋“ค ์ฐธ๊ณ  https://stackoverflow.com/a/36455983 https://developer.android.com/studio/publish/app-signing?hl=ko#secure-shared-keystore ๋ฌธ์„œ ์ž‘์„ฑ ํ•„์š”์„ฑ ๊ธ‰ํ•˜๊ฒŒ zero base ํ”„๋กœ์ ํŠธ๋ฅผ ๋„˜๊ฒจ๋ฐ›์•„์„œ ์ผ์„ ํ–ˆ์—ˆ์Œ. ์ด๊ฒƒ ์ €๊ฒƒ ๋นŒ๋“œ ๊ด€๋ จํ•ด์„œ ์„ค์ • ํ•ด์•ผํ•˜๋Š” ๊ฑด ์•„๋Š”๋ฐ ๊ตฌ์ฒด์ ์ธ ๋ฐฉ๋ฒ•๋“ค์€ ํ™•์‹คํ•˜๊ฒŒ ์ƒ๊ฐ์ด ๋‚˜์ง€ ์•Š์•„ ๋‹ค ๊ฒ€์ƒ‰ํ•˜๋ฉฐ ์ฐพ์•„์•ผ ํ–ˆ์Œ. ์ด๋ฒˆ์— ์ •๋ฆฌํ•ด์„œ ๋‹ค์Œ ๋ฒˆ์— ๋ˆ„๋ฝ ์‚ฌํ•ญ ์—†์ด, ๋œ ํ—ค๋งค๋ฉด์„œ ๋น ๋ฅด๊ฒŒ ์ž‘์—…ํ•˜๊ธฐ ์œ„ํ•ด ๊ธฐ๋กํ•จ. ๊ธฐ๋ก ๋Œ€์ƒ apk, aab ํŒŒ์ผ ์ด๋ฆ„ ์ž๋™ ์ƒ์„ฑ flavor/type ๋ณ„ ์„ค์ • flavor/type ๋ณ„ ์‚ฌ์ด๋‹ ํ‚ค ์ž๋™ ์„ค์ • flavor/type ๋ณ„ ์•ฑ ์ด๋ฆ„ ์ž๋™ ์„ค์ • ๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „ ์„ค์ • buildF..
[Android][Compose][์‚ฝ์งˆ ๊ตํ›ˆ] Compose Migration + Expandable List ์‹œ์ž‘ ๊ธฐ์กด ํ”„๋กœ์ ํŠธ๋Š” ์•„์ง๋„ deprecated ๋œ jcenter repository์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์“ฐ๊ณ  ์žˆ๋‹ค. Gradle 8.0์˜ ๊ธฐ๋Šฅ์„ ์˜จ์ „ํžˆ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์ € jcenter์— ๋ฌผ๋ฆฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ๊ต์ฒดํ•ด์•ผ ํ•œ๋‹ค. ๊ต์ฒด ๋Œ€์ƒ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ค‘ ExpandedRecyclerView๋ฅผ ์ œ๊ณตํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์žˆ๋‹ค. ์•ฑ์—์„œ ๋งŽ์ด ์“ฐ์ด๋Š” ๊ธฐ๋Šฅ๋„ ์•„๋‹ˆ๊ณ , ์•ฝ๊ด€ ์„ค๋ช…์„ ์œ„ํ•ด ๊ฐ„๋‹จํžˆ ์“ฐ์ด๋Š” ๊ฒƒ ๋ฟ์ด๋ผ์„œ ์ง์ ‘ ๋งŒ๋“ค๊ธฐ๋กœ ํ–ˆ๋‹ค. Compose๋กœ ๋งŒ๋“œ๋Š” ๊ฒŒ ๋” ๊ฐ„๋‹จํ•  ๊ฒƒ ๊ฐ™์•„์„œ ์‹œ์ž‘ํ–ˆ๋‹ค. Gradle ์„ค์ • ์ฐธ๊ณ  : https://velog.io/@blucky8649/Android-%EA%B8%B0%EC%A1%B4-%EC%95%B1%EC%97%90-Compose-UI-%EC%A0%81%EC%9A%A9-%EC%8B%9C%E..
[Kotlin] Calendar extensions ๊ฐ„๋‹จ val Calendar.year: Int get() = this.get(Calendar.YEAR) val Calendar.month: Int get() = this.get(Calendar.MONTH) val Calendar.day: Int get() = this.get(Calendar.DAY_OF_MONTH) val Calendar.dayOfWeek: Int get() = this.get(Calendar.DAY_OF_WEEK)