๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ (377) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [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.. [Android][Kotlin] ์ฌ์ฉ์๊ฐ ์ ํํ ํญ์ ๋ฌธ๊ตฌ์ ๋ณผ๋ ์ฒ๋ฆฌ ๊ธฐ๋ณธ Tab ๋ณผ๋ ์ฒ๋ฆฌ fun TabLayout.Tab.setBold() = this.view.children.find { it is TextView }?.let { tv -> (tv as TextView).post { tv.setTypeface(null, Typeface.BOLD) } } ๋ค๋ฅธ Typeface๋ก ๊ต์ฒด ๊ฐ๋ฅ https://developer.android.com/reference/android/graphics/Typeface#summary Typeface | Android Developers developer.android.com ์ ํ์ง๊ฐ 4๊ฐ์ง ๋ฐ์ ์๊ธฐ๋ ํ๋ค. ์ฌ์ฉ์๊ฐ ์ ํํ ํญ์ ๋ฌธ๊ตฌ ๋ณผ๋ ์ฒ๋ฆฌ fun TabLayout.setSelectedTabBold() = this.addOnTa.. [Kotlin] BaseUseCase abstract class UseCase where Type : Any { abstract suspend operator fun invoke(params: Params): Type? } ์ด์ 1 ยทยทยท 31 32 33 34 35 36 37 ยทยทยท 48 ๋ค์