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

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

(377)
[Android] RecyclerView setHasFixedSize developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView#sethasfixedsize RecyclerView | Android ๊ฐœ๋ฐœ์ž | Android Developers RecyclerView open class RecyclerView : ViewGroup, ScrollingView, NestedScrollingChild2, NestedScrollingChild3 Known Direct Subclasses BaseGridView An abstract base class for vertically and horizontally scrolling lists. WearableRecyclerView Wearable spec..
[Android] AppCompat Library ์‚ฌ์šฉ ์ด์œ  developer.android.com/jetpack/androidx/releases/appcompat?hl=ko AppCompat | Android ๊ฐœ๋ฐœ์ž | Android Developers AppCompat ์ด์ „ API ๋ฒ„์ „์˜ ํ”Œ๋žซํผ์—์„œ ์ƒˆ API์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(๋Œ€๋ถ€๋ถ„ ๋จธํ‹ฐ๋ฆฌ์–ผ ๋””์ž์ธ ์‚ฌ์šฉ). ์ตœ๊ทผ ์—…๋ฐ์ดํŠธ ํ˜„์žฌ ์•ˆ์ •ํ™” ๋ฒ„์ „ ๋‹ค์Œ ๋ฒ„์ „ ํ›„๋ณด ๋ฒ ํƒ€ ๋ฒ„์ „ ์•ŒํŒŒ ๋ฒ„์ „ 2021๋…„ 1์›” 13์ผ 1.2.0 - 1.3.0- developer.android.com AppCompat์€ Android Jetpack ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ํ•˜๋‚˜. ์ด์ „ API ๋ฒ„์ „์˜ ํ”Œ๋žซํผ์—์„œ ์ƒˆ API์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ Material Design์„ ์ง€์›ํ•œ๋‹ค. > ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ๋ฌธ์ œ ํ•ด๊ฒฐ. ์ด์ „ ๋ฒ„์ „ ํ”Œ๋žซํผ์—์„œ ์ œ๊ณตํ•˜์ง€ ์•Š๋Š”..
[Kotlin] Equality ==, === kotlinlang.org/docs/equality.html Equality - Help | Kotlin kotlinlang.org ์ฝ”ํ‹€๋ฆฐ์˜ equality ํƒ€์ž…์—๋Š” ๋‘ ๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. ๊ตฌ์กฐ์  equality ( == : equals()๋กœ ํ™•์ธํ•œ๋‹ค.) ์ฐธ์กฐ equality (===: ๊ฐ™์€ ๊ฐ์ฒด์˜ ์ฐธ์กฐ ํฌ์ธํŠธ๋ฅผ ๋น„๊ตํ•œ๋‹ค.) ๊ตฌ์กฐ์  equality ๊ตฌ์กฐ์  equality๋Š” == ์—ฐ์‚ฐ์œผ๋กœ ํ™•์ธํ•˜๊ณ , ๋ฐ˜๋Œ€ ์—ฐ์‚ฐ์€ != ์œผ๋กœ ํ™•์ธํ•œ๋‹ค. ๊ด€๋ก€์ƒ, a == b ํ‘œํ˜„์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ „ํ™˜๋œ๋‹ค. a?.equals(b) ?: (b == null) a๊ฐ€ null์ด ์•„๋‹ˆ๋ฉด equals(Any?)๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค. a๊ฐ€ null์ด๋ฉด b์˜ ์ฐธ์กฐ๊ฐ€ null๊ณผ ๊ฐ™์€์ง€ ํ™•์ธํ•œ๋‹ค. ๋ช…์‹œ์ ์œผ๋กœ null ๊ฐ’๊ณผ ๋™์ผํ•œ์ง€ ๋น„๊ตํ•  ๋•Œ๋Š” ์ตœ์ ํ™”ํ•  ๊ฒƒ์€ ์—†..
[Design Pattern] Delegation Pattern en.wikipedia.org/wiki/Delegation_pattern Delegation pattern From Wikipedia, the free encyclopedia Jump to navigation Jump to search In software engineering, the delegation pattern is an object-oriented design pattern that allows object composition to achieve the same code reuse as inheritance. In delegation, an obj en.wikipedia.org ์ƒ์†๊ณผ ๊ฐ™์ด ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ์„ ํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ฐ์ฒด๋ฅผ ๊ตฌ์„ฑํ•˜๋„๋ก ํ•˜๋Š” ๊ฐ์ฒด ์ง€ํ–ฅ ๋””์ž์ธ ํŒจํ„ด. ๋‘ ๊ฐœ์˜ ๊ฐ์ฒด(์ˆ˜์‹  ๊ฐœ์ฒด,..
[Kotlin] Delegation kotlinlang.org/docs/delegation.html#overriding-a-member-of-an-interface-implemented-by-delegation Delegation - Help | Kotlin kotlinlang.org Delegation pattern ์€ ์ƒ์†์„ ๊ตฌํ˜„ํ•˜๋Š”๋ฐ์— ๋Œ€์ฒดํ•˜๊ธฐ ์ข‹๊ณ , Kotlin์€ ๋ณด์ผ๋Ÿฌ์ฝ”๋“œ ์—†์ด ์‚ฌ์šฉํ•˜๋„๋ก ์ง€์›ํ•œ๋‹ค. -> Delegation pattern ํ™•์ธ Derived ํด๋ž˜์Šค๋Š” ์ง€์ •ํ•œ ๊ฐ์ฒด(์—ฌ๊ธฐ์„œ๋Š” BaseImpl)๋กœ ๋ชจ๋“  public ๋ฉค๋ฒ„๋“ค์„ ์œ„์ž„ํ•ด์„œ Base ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค. interface Base { fun print() } class BaseImpl(val x: Int) : Base { override fun print..
[Programming] Backpressure medium.com/@jayphelps/backpressure-explained-the-flow-of-data-through-software-2350b3e77ce7 Backpressure explained — the flow of data through software Backpressure is something nearly every software engineer will have to deal with at some point, and for some it’s a frequent problem. But… medium.com ์ดํ•ดํ•œ ๋ฐ”๋ฅผ ์ •๋ฆฌ ์†Œํ”„ํŠธ์›จ์–ด์˜ ๋ชฉ์ ์€ ์ธํ’‹ ๋ฐ์ดํ„ฐ๋ฅผ ์›ํ•˜๋Š” ์•„์›ƒํ’‹ ๋ฐ์ดํ„ฐ๋กœ ๋ณ€ํ™˜์‹œํ‚ค๋Š” ๊ฒƒ์ด๋‹ค. Backpressure๋Š” ์ธํ’‹ ๋ฐ์ดํ„ฐ๋ฅผ ์•„์›ƒํ’‹ ๋ฐ์ดํ„ฐ๋กœ ๋ณ€ํ™˜์‹œํ‚ค๋Š” ๊ณผ์ •์— ๋ชจ์ข…์˜ ..
[Kotlin Coroutines] Channels kotlinlang.org/docs/channels.html#channel-basics Channels - Help | Kotlin kotlinlang.org kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-channel/ Channel - kotlinx-coroutines-core Channel Channel is a non-blocking primitive for communication between a sender (via SendChannel) and a receiver (via ReceiveChannel). Conceptually, a channel is similar to Java’..
[Android] java.lang.IllegalStateException: Can't access the Fragment View's LifecycleOwner when getView() is null i.e., before onCreateView() or after onDestroyView() ๋กœ๊ทธ ํ™•์ธ java.lang.IllegalStateException: Can't access the Fragment View's LifecycleOwner when getView() is null i.e., before onCreateView() or after onDestroyView() ํ”„๋ž˜๊ทธ๋จผํŠธ์˜ onCreate() ์•ˆ์—์„œ getViewLifeCycleOwner() ๋ฅผ ํ˜ธ์ถœํ•ด์„œ ๋ฐœ์ƒํ•œ ์ด์Šˆ์ด๋‹ค. 1. Fragment.java์˜ getViewLiveCycleOwner()๊ฐ€ ๋ฐ˜ํ™˜ํ•˜๋Š” ๋ณ€์ˆ˜๋ฅผ ํ™•์ธํ–ˆ๋‹ค. // This is initialized in performCreateView and unavailable outside of the // onCreateView/onDestroyView lifecycle..