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

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(387)
[Android][Lint] Missing baselineAligned attribute ์‹œ์ž‘ Lint ๊ฒฝ๊ณ  ํ™•์ธ ์ค‘ ํ•ด๋‹น ๊ฒฝ๊ณ ๋ฅผ ํ™•์ธํ–ˆ๋‹ค. ๊ด€๋ จ ์„ค๋ช…์€ ์ด๋Ÿฌํ•˜๋‹ค. Set android:baselineAligned="false" on this element for better performance ๋ฐœ๋ฒˆ์—ญ ์ด ์š”์†Œ์˜ ์„ฑ๋Šฅ ๊ฐœ์„ ์„ ์œ„ํ•ด android:baselineAligned="false" ๋กœ ์„ค์ •ํ•˜์‹œ์˜ค. ์‚ดํŽด๋ณด๋‹ˆ ์ด ๊ฒฝ๊ณ ๊ฐ€ ๋œจ๋Š” ๋ถ€๋ถ„๋“ค์€ LinearLayout๋“ค์ด๋‹ค. When a LinearLayout is used to distribute the space proportionally between nested layouts, the baseline alignment property should be turned off to make the layout computation faster. ๋ฐœ..
[Android][WebView] cannot find symbol method setAppCacheEnabled(boolean) ์‹œ์ž‘. ์ด์Šˆ ํ™•์ธ target version์ด 31์ธ ํ”„๋กœ์ ํŠธ์˜ target version์„ 33์œผ๋กœ ์ˆ˜์ •ํ–ˆ๋‹ค. ๊ทธ ํ›„ cannot find symbol method setAppCacheEnabled(boolean) ๋ผ๋Š” ๋นŒ๋“œ ์—๋Ÿฌ๋ฅผ ํ™•์ธํ–ˆ๋‹ค. ์‚ดํŽด๋ณด๋‹ˆ ๊ธฐ์กด์— ์ž˜ ์“ฐ๋˜ ์ฝ”๋“œ๋ฅผ IDE์—์„œ ํ‰์†Œ์™€๋Š” ๋‹ค๋ฅด๊ฒŒ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ๋‹ค. ๋‚ด๋ถ€ ์ฝ”๋“œ ํ™•์ธ WetSettings์˜ ๋‚ด๋ถ€ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•œ๋‹ค. target version์ด 31์ผ ๋•Œ์—๋Š” Control ํ‚ค + ๋งˆ์šฐ์Šค ํด๋ฆญ์œผ๋กœ ๋‚ด๋ถ€ ์ฝ”๋“œ๋กœ์˜ ์ด๋™์ด ๊ฐ€๋Šฅํ–ˆ๋Š”๋ฐ, target version์ด 33์ผ ๋•Œ์—๋Š” ์ด ๋ฐฉ๋ฒ•์œผ๋กœ ๋‚ด๋ถ€ ์ฝ”๋“œ๋กœ์˜ ์ด๋™์ด ๋ถˆ๊ฐ€ํ–ˆ๋‹ค. WebSettings ํด๋ž˜์Šค ์ฝ”๋“œ๋ฅผ ์ฐพ์•„๋‚˜์…”์„œ target version์ด 33์ผ ๋•Œ์˜ ํ•ด๋‹น ์ฝ”๋“œ์˜ ๋‚ด๋ถ€ ์ฝ”๋“œ๋ฅผ..
[Java] Collapse 'catch' blocks ์‹œ์ž‘ Lint ๊ฒฝ๊ณ ์— ๋Œ€์‘ํ•˜๋ฉด์„œ ๊ธฐ์กด try - catch ๋ฌธ์—์„œ ๋‹ค๋ฅธ exception๋„ catch ๋ฌธ์— ๋„ฃ๊ฒŒ ๋˜์—ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ IDE์—์„œ Collapse 'catch' blocks ๋ผ๋ฉฐ catch ๋ฌธ์— ๋ฌด์–ธ๊ฐ€ ๋ณ€๊ฒฝ์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๋ ค์คฌ๋‹ค. IDE์˜ ์ž‘์—… ํ›„ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋กœ์ง์ด ๊ฐ™์€ ๋‘ catch ๋ฌธ ๋ธ”๋Ÿญ์„ ํ•˜๋‚˜๋กœ ์“ธ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฑธ ์•Œ์•˜๋‹ค. Collapse ์˜๋ฏธ Collapse 'catch' blocks์˜ 'collapse' ์˜๋ฏธ๋ฅผ ์ฐพ์•„๋ดค๋‹ค. https://en.dict.naver.com/#/entry/enko/e0708beb85ad4906a123396e1c971bee ๋„ค์ด๋ฒ„ ์˜์–ด์‚ฌ์ „ ๋ฏธ๊ตญ/์˜๊ตญ์‹ ๋ฐœ์Œ, ์—ฌ๋Ÿฌ ์ข…๋ฅ˜์˜ ์ถœํŒ์‚ฌ ์‚ฌ์ „ ๋œปํ’€์ด, ํ’๋ถ€ํ•œ ์œ ์˜์–ด/๋ฐ˜์˜์–ด, ๋Œ€ํ‘œ์‚ฌ์ „ ์„ค์ • ๊ธฐ๋Šฅ, ์ƒ์„ธ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ, ์˜์–ด..
[Android][WebView] ์•ฑ๊ณผ WebVeiw ๊ฐ„ ํ†ต์‹  https://developer.android.com/develop/ui/views/layout/webapps/webview Build web apps in WebView | Android Developers If you want to deliver a web application (or just a web page) as a part of a client application, you can do it using WebView. The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout. developer.android.com 1) ..
[์ž๋ฃŒ๊ตฌ์กฐ] ์—ฐ๊ฒฐ ๋ฆฌ์ŠคํŠธ ๋‹จ์ผ ์—ฐ๊ฒฐ ๋ฆฌ์ŠคํŠธ ๋…ธ๋“œ ๊ตฌ์„ฑ : ๋ฐ์ดํ„ฐ + link(๋‹ค์Œ ๋…ธ๋“œ์— ๋Œ€ํ•œ ์—ฐ๊ฒฐ ๊ณ ๋ฆฌ. ํฌ์ธํ„ฐ ํ˜น์€ ๋ ˆํผ๋Ÿฐ์Šค) ์ฒซ ๋ฒˆ ์งธ ๋…ธ๋“œ : ํ—ค๋” header ๋งˆ์ง€๋ง‰ ๋…ธ๋“œ : ๊ผฌ๋ฆฌ tail. link๋Š” ๋น„์›Œ๋‘๊ฑฐ๋‚˜ null๋กœ ์ง€์ •ํ•จ ๋…ธ๋“œ์˜ link๋Š” ๋‹ค์Œ ๋…ธ๋“œ๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” ํฌ์ธํŠธ๋‚˜ ๋ ˆํผ๋Ÿฐ์Šค๋กœ๋งŒ ๊ตฌ์„ฑ๋จ. ๊ทธ๋ž˜์„œ ์•ž์œผ๋กœ๋งŒ ์ข…์ฃผ ๊ฐ€๋Šฅ ๋ฆฌ์ŠคํŠธ๋ฅผ ์™„์ • ์ข…์ฃผํ•˜๋ ค๋ฉด ํ•ญ์ƒ ์ฒซ ๋ฒˆ์งธ ์›์†Œ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ด์•ผ ํ•œ๋‹ค. ๋ฆฌ์ŠคํŠธ์— ์žˆ๋Š” ๋ชจ๋“  ์›์†Œ์˜ ์œ„์น˜๋ฅผ ํŒŒ์•…ํ•˜๋ ค๋ฉด ๋ฆฌ์ŠคํŠธ์˜ ์ฒซ ๋ฒˆ์งธ ์›์†Œ์— ๋Œ€ํ•œ ํฌ์ธํ„ฐ๋‚˜ ๋ ˆํผ๋Ÿฐ์Šค๊ฐ€ ์žˆ์–ด์•ผ ํ•œ๋‹ค. ์ฒซ ๋ฒˆ์žฌ ์›์†Œ์˜ ํฌ์ธํ„ฐ๋‚˜ ๋ ˆํผ๋Ÿฐ์Šค๋Š” ๋ณดํ†ต ๋ณ„๋„์˜ ์ž๋ฃŒ๊ตฌ์กฐ์— ์ €์žฅํ•จ. ๋…ธ๋“œ. ์ฝ”ํ‹€๋ฆฐ์œผ๋กœ ์ž‘์„ฑ class SinglyLinkedListElement(val value: T, var next: SinglyLinkedListElemen..
[Android][Toast] Can't toast on a thread that has not called Looper.prepare() Crashlytics์—์„œ ์ด์Šˆ ํ•ด๋‹น ๋ฐœ๊ฒฌ ๋งˆ์ด๋„ˆ ์ด์Šˆ๋กœ ๋“ฑ์žฅํ•˜๊ณ  ์žˆ๋‹ค. (๊ณ  ํŒ๋‹จํ•˜๊ณ  ์žˆ๋‹ค. ์ œ๋ฐœ ๋งˆ์ด๋„ˆ ์ด์Šˆ์—ฌ๋ผ...) ์ด์Šˆ์— ๋Œ€ํ•œ ์„ค๋ช…๋“ค https://stackoverflow.com/a/3875204 Can't create handler inside thread that has not called Looper.prepare() What does the following exception mean; how can I fix it? This is the code: Toast toast = Toast.makeText(mContext, "Something", Toast.LENGTH_SHORT); This is the exception: java.lang.RuntimeExce... stackoverflow...
[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)
[Kotlin] Selection Sort ์ง€์ •ํ•œ ์ž๋ฆฌ์— ํƒ์ƒ‰ ๋ฒ”์œ„(๋น„๊ต ๋Œ€์ƒ)์—์„œ ์ฐพ์€ ๋งž๋Š” ๊ฐ’(๊ฐ€์žฅ ์ž‘๊ฑฐ๋‚˜, ๊ฐ€์žฅ ํฌ๊ฑฐ๋‚˜)์„ ์ฐพ์•„ ๋„ฃ๋Š”๋‹ค. ๊ธฐ๋ณธ swap fun ArrayList.swap(firstIndex: Int, secondIndex: Int) { val temp = this[firstIndex] this[firstIndex] = this[secondIndex] this[secondIndex] = temp } Selection Sort fun ArrayList.selectionSort(showLog: Boolean = true) :ArrayList { if (this.size < 2) { println("๋ฐฐ์—ด ํฌ๊ธฐ : ${this.size}. ๋ฐฐ์—ด ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜") return this } for (currentPosition in 0 u..