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

์ „์ฒด ๊ธ€

(374)
[Google IO 2023] Optimize activity-based apps for large screens / Activity Embedding ์„ค๋ช… https://www.youtube.com/watch?v=zx20-3GSdHw Activity Embedding ํฐ ํ™”๋ฉด์„ ๊ฐ€์ง„ ๋””๋ฐ”์ด์Šค์—์„œ ์•กํ‹ฐ๋น„ํ‹ฐ๋ฅผ ๋ฒ ์ด์Šค๋กœ ํ•˜๋Š” ์•ฑ ํ™”๋ฉด๋“ค์˜ ์ตœ์ ํ™”๋ฅผ ๋•๋Š”๋‹ค. ๋‘ ์•กํ‹ฐ๋น„ํ‹ฐ๋ฅผ ํฐ ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง ์—†์ด ํ•œ ํ™”๋ฉฐ์— ๋‚˜๋ž€ํžˆ ๋ณด์—ฌ์ค€๋‹ค. ๋‚ด๋ถ€ ๋™์ž‘ ์ž๋™์œผ๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ณต๊ฐ„์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์˜ค๋ฅธ์ชฝ ํ™”๋ฉดpresentation๊ณผ ์„ค์ •๋“ค์„ ์„ ํƒํ•œ๋‹ค. ๋Ÿฐํƒ€์ž„์—๋Š” ์ž๋™์œผ๋กœ ์œˆ๋„์šฐ ํฌ๊ธฐ ๋ณ€๊ฒฝ์— ๋Œ€์‘ํ•ด ํด๋”๋ธ” ํฐ์„ ์ ‘๊ฑฐ๋‚˜ ํŽผ์น  ๋•Œ ์˜ค๋ฅธ์ชฝ ๋ ˆ์ด์•„์›ƒ์„ ์ž๋™์œผ๋กœ ์žก์•„์ค€๋‹ค. ์•ˆ๋“œ๋กœ์ด๋“œ์˜ ๊ธฐ๋ณธ์ ์ธ ์•กํ‹ฐ๋น„ํ‹ฐ ์ˆœ์„œ๋ฅผ ๋ณ€๊ฒฝ์‹œํ‚ค์ง€ ์•Š๋Š”๋‹ค. ๋‘ ๊ฐœ์˜ ์ปจํ…Œ์ด๋„ˆ๋“ค์ด๋‚˜ ์Šคํƒ๋“ค(์ฃผ์š” ์Šคํƒprimary stack, ๋ถ€์ฐจ ์Šคํƒsecondary stack)์„ ์ƒ์„ฑํ•œ๋‹ค. ๋ถ€์ฐจ ์Šคํƒ์€ ํ•ญ์ƒ ์ตœ์ƒ์œ„์— ์žˆ๊ณ , ์ฃผ์š” ์Šคํƒ ์œ„์— ์žˆ๋‹ค. ..
[Google IO 2023] How to build great Android apps for large screens and foldables ํฐ ํ™”๋ฉด ๋Œ€์‘ https://www.youtube.com/watch?v=5JQjk3ZqPWc ์‚ฌ์šฉ์ž๋“ค์€ ๋””๋ฐ”์ด์Šค๋“ค ๋ณ„ ํŠน์ง•์— ๋งž๋Š” ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ์š”๊ตฌํ•œ๋‹ค. ์ด์— ํฐ ํ™”๋ฉด์— ๋Œ€ํ•œ ์•ฑ ํ€„๋ฆฌํ‹ฐ๋ฅผ ๋†’์ด๊ธฐ ์œ„ํ•œ ์ž‘์—…์ด ํ•„์š”ํ•˜๋‹ค. Section 1 ํฐ ํ™”๋ฉด(ํƒœ๋ธ”๋ฆฟ, ํด๋”๋ธ”)์—์„œ์˜ ์˜ˆ์‹œ๋ฅผ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด ์ด๋ฒˆ์— ์—…๋ฐ์ดํŠธ๋œ ๊ตฌ๊ธ€ ์•ฑ๋“ค ๋ฐ ํ”ฝ์…€ ๋Ÿฐ์ฒ˜๋“ค์„ ์ฐธ๊ณ ํ•˜๋ผ Section 2 ํฐ ํ™”๋ฉด๋“ค์—์„œ์˜ ์•ฑ ํ˜ธํ™˜์„ฑ ํฐ ํ™”๋ฉด์—์„œ์˜ ์‚ฌ์šฉ์ž ์š”๊ตฌ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. 1. ์ž์œ ๋กœ์šด ํ™”๋ฉด ํšŒ์ „ 2. folding, unfolding 3. ๋ฉ€ํ‹ฐ ์œˆ๋„์šฐ ๋ชจ๋“œ ์ข‹์€ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ์œ„ํ•ด์„œ๋Š” ํ™”๋ฉด ๋ณ€๊ฒฝ ์‹œ์˜ ์ƒํƒœ ์œ ์ง€, ๊ตฌ์„ฑconfiguration ๋ณ€๊ฒฝ ๋ฐ ์—ฐ์†์ ์ธ ์•ฑ ์‚ฌ์šฉ ๊ฒฝํ—˜ ๋“ฑ์˜ ์ฒ˜๋ฆฌ๊ฐ€ ์ค‘์š”ํ•˜๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๋””๋ฐ”์ด์Šค์˜ ํŠน์ง•์„ ์‚ด๋ ค ์•ฑ์„ ์‚ฌ์šฉํ•œ๋‹ค. ํƒœ๋ธ”๋ฆฟ, ํฌ๋กฌ๋ถ ..
[Android][Glide] You can't start or clear loads in RequestListener or Target callbacks. ์—๋Ÿฌ ๋กœ๊ทธ ํ™•์ธ Caused by: java.lang.IllegalStateException: You can't start or clear loads in RequestListener or Target callbacks. If you're trying to start a fallback request when a load fails, use RequestBuilder#error(RequestBuilder). Otherwise consider posting your into() or clear() calls to the main thread using a Handler instead. ๋ฌธ์ œ์˜ ์ฝ”๋“œ private void setData() { ... Glide.with(imageView) .asBitmap(..
[Android] ์‹œ์Šคํ…œ ๋ฐ” ์ œ์–ด decor view์˜ ์“ฐ์ž„์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋‹ค๊ฐ€ ์‹œ์Šคํ…œ ๋ฐ” ์ œ์–ด๋ฅผ ๋ณด๊ฒŒ ๋๋‹ค. ์‹œ์Šคํ…œ ๋ฐ”๋Š” ๋ฌด์—‡์„ ์˜๋ฏธํ•˜๋‚˜ https://developer.android.com/training/system-ui ์‹œ์Šคํ…œ UI ๊ณต๊ฐœ ์ƒํƒœ ์ œ์–ด | Android ๊ฐœ๋ฐœ์ž | Android Developers ์‹œ์Šคํ…œ UI ๊ณต๊ฐœ ์ƒํƒœ ์ œ์–ด ์ปฌ๋ ‰์…˜์„ ์‚ฌ์šฉํ•ด ์ •๋ฆฌํ•˜๊ธฐ ๋‚ด ํ™˜๊ฒฝ์„ค์ •์„ ๊ธฐ์ค€์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ €์žฅํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜์„ธ์š”. ๊ทธ๋ฆผ 1. [1] ์ƒํƒœ ํ‘œ์‹œ์ค„ ๋ฐ [2] ํƒ์ƒ‰ ๋ฉ”๋‰ด๊ฐ€ ํฌํ•จ๋œ ์‹œ์Šคํ…œ ํ‘œ์‹œ์ค„ ์‹œ์Šคํ…œ ํ‘œ์‹œ์ค„์€ developer.android.com The system bars are screen areas dedicated to the display of notifications, communication of device status,..
[Java][Thread] Happens-before relationship Java์˜ ๋™์‹œ์„ฑ ๊ด€๋ จ ๋ถ€๋ถ„์„ ์‚ดํ”ผ๋‹ค๊ฐ€ 'happens-before relationship'์ด๋ž€ ์šฉ์–ด๊ฐ€ ์ž์ฃผ ๋“ฑ์žฅํ•˜๋Š” ๊ฒƒ์„ ์•Œ์•˜๋‹ค. https://www.logicbig.com/tutorials/core-java-tutorial/java-multi-threading/happens-before.html Java - Understanding Happens-before relationshipJava - Understanding Happens-before relationship [Last Updated: May 19, 2018]www.logicbig.comhttps://en.wikipedia.org/wiki/Happened-before Happened-before - WikipediaFrom Wikipedia,..
[Kotlin] Obejct๋กœ ์„ ์–ธํ•œ Singleton ๊ฐ์ฒด์˜ ์ƒ์„ฑ์€ Lazy ํ•œ๊ฐ€? Java๋กœ ์ž‘์„ฑ๋œ ์ฝ”๋“œ๋ฅผ Kotlin์œผ๋กœ ์ž‘์„ฑํ•˜๋‹ค๊ฐ€ ๋“  ์˜๋ฌธ์œผ๋กœ ์‹œ์ž‘ํ•จ. Java์—์„œ Singleton ํŒจํ„ด์œผ๋กœ ์ž‘์„ฑ๋œ ํด๋ž˜์Šค๋“ค์€, ํ˜ธ์ถœ ์‹œ instance๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ , instatnce๊ฐ€ ์—†์„ ๊ฒฝ์šฐ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ์„ ์ž์ฃผ ๋ด์™”๋‹ค. Kotlin์—์„œ object๋กœ ์„ ์–ธํ•ด ์ž‘์„ฑํ•˜๋ฉด singleton ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•œ๋‹ค๊ณ  ์•Œ๊ณ  ์žˆ์–ด์„œ, ์ •๋ง ํŽธ๋ฆฌํ•˜๊ฒŒ object ํ‚ค์›Œ๋“œ๋ฅผ ์“ฐ๋ฉฐ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ, java ์ฝ”๋“œ์—์„œ ์ž‘์„ฑํ•œ singleton ํŒจํ„ด๊ณผ ์ •๋ง ๋™์ผํ•˜๊ฒŒ ๋™์ž‘ํ•˜๋Š”๊ฒŒ ๋งž๊ฒ ์ง€?๋ผ๋Š” ์˜๋ฌธ์ด ๋“ค์—ˆ๋‹ค. ํ™•์ธ ๋“ค์–ด๊ฐ„๋‹ค. ๊ฒฐ๋ก  > ๊ณต์‹๋ฌธ์„œ ์ƒ์— ๋”ฐ๋ฅด๋ฉด ๊ทธ๋Ÿฌํ•˜๋‹ค. ๊ณต์‹๋ฌธ์„œ์˜ ์–ธ๊ธ‰์„ ์ฐพ์•„๋ณธ๋‹ค. https://kotlinlang.org/docs/object-declarations.html#object-decl..
[Network] HTTP headers ๊ธฐ์ ์„ ๋ถ€๋ฅด๋Š” ์•ˆ๋“œ๋กœ์ด๋“œ ํ†ต์‹  ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ธฐ์ ์„ ๋ถ€๋ฅด๋Š” ์•ˆ๋“œ๋กœ์ด๋“œ ํ†ต์‹  ํ”„๋กœ๊ทธ๋ž˜๋ฐ - YES24 ์•ˆ๋“œ๋กœ์ด๋“œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์•ˆ๋‚ด์„œ. ์•ˆ๋“œ๋กœ์ด๋“œ๊ฐ€ ์ œ๊ณตํ•˜๋Š” ๊ธฐ๋Šฅ๋“ค์— ๊ตญํ•œํ•˜์ง€ ์•Š๊ณ  ๋‹ค์–‘ํ•œ ์—…์ฒด์—์„œ ์ œ๊ณตํ•˜๋Š” ํŒจํ‚ค์ง€์™€ ํ†ต์‹  ํ”„๋กœํ† ์ฝœ ๊ทธ๋ฆฌ๊ณ  ์ž๋ฐ”์˜ ๊ณ ์œ  ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ†ต์‹ ์˜ ์ „๋ฐ˜์ ์ธ ๊ธฐ๋Šฅ www.yes24.com https://www.blog-dreamus.com/post/cache-control-%EC%9D%B4-%ED%95%84%EC%9A%94%ED%95%9C-%EC%9D%B4%EC%9C%A0 'Cache-Control'์ด ํ•„์š”ํ•œ ์ด์œ  ์•ฑ์˜ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ• ์ค‘ ํ•˜๋‚˜์ธ ์บ์‹œ. ํด๋ผ์ด์–ธํŠธ์—์„œ ์บ์‰ฌ๋ฅผ ํ•˜๊ณ , ์„œ๋ฒ„์—์„œ ์ปจํŠธ๋กค์ด ๊ฐ€๋Šฅํ•œ Cache-Control์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ด…๋‹ˆ๋‹ค. www.blog-dreamus.c..
[Kotlin][Java] ByteArrays๋ฅผ 16์ง„์ˆ˜(Hex) String์œผ๋กœ ๋ณ€ํ™˜ https://www.baeldung.com/kotlin/byte-arrays-to-hex-strings ์—ฌ๊ธฐ์— ์ •๋ง ์ž˜ ๋‚˜์™”์Œ. ๋‹ค์–‘ํ•œ ๋ฐฉ๋ฒ•์ด ์กด์žฌํ–ˆ๋‹ค. ๊ทธ ์ค‘์—์„œ ๋‹ค์Œ์˜ ๋ฐฉ๋ฒ•์— ์ฃผ๋ชฉํ–ˆ๋‹ค. https://www.baeldung.com/kotlin/byte-arrays-to-hex-strings val hexChars = "0123456789abcdef".toCharArray() fun ByteArray.toHex4(): String { val hex = CharArray(2 * this.size) this.forEachIndexed { i, byte -> val unsigned = 0xff and byte.toInt() hex[2 * i] = hexChars[unsigned / 16] hex[2 * i..