일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- ExoPlayer
- 안드로이드
- ktor client
- FastAPI
- android custom view
- ListAdapter
- list map
- 시행착오
- kotlin collection
- ktor api call
- video caching
- 스피너
- build with ai
- 유튜브 요약
- getChangePayload
- 유튜브
- AWS EC2
- ChatGPT
- map
- ListAdapter DiffUtil
- Zsh
- exoplayer cache
- llm
- DiffUtil.ItemCallback
- android ktor
- doc2vec
- android exoplayer
- kotlin list
- Python
- android
- Today
- Total
목록android custom view (3)
버튼 수집상

위처럼 모서리가 둥글고 살짝 그림자가 지는 자동완성 검색어 UI를 그려주기 위해 커스텀 뷰를 만들었다. 뷰바인딩 세팅하기 build.gradle.kts(:app) plugins { id("com.android.application") id("org.jetbrains.kotlin.android") } android { // 생략.. buildFeatures { viewBinding = true } } 자동완성 커스텀뷰의 베이스 뷰 xml layout_auto_complete.xml 자동완성 커스텀뷰의 베이스 뷰 배경 drawable background_auto_complete_shadow.xml 그림자 레이어를 쌓으면서 위 레이어에서부터 순서대로 넓은 영역 -> 좁은 영역 연한 색 -> 진한 색 으로 그려..

예전에 stackoverflow에 남겼던 질문을 여기 지면에 정리 https://stackoverflow.com/questions/72925716/coroutine-equivalent-of-flowable-mergedelayerror Coroutine equivalent of Flowable.mergeDelayError I'm in the middle of migrating Rxjava based project to Coroutine Flow. I need to merge multiple api calls and if one of them fails, I still want it to proceed and do the job. Here's the original co... stackoverflow.com..
배경 Compose를 아직 도입하지 않은 xml 베이스의 프로젝트에서도 코드로 뷰를 생성해서 쓸 때가 있다. 그럴 때 커스텀뷰를 만들면 반복되는 코드를 은닉하면서 코드 가독성이 좋아진다는 장점이 있다. 커스텀뷰를 만들면서 겪었던 시행착오들과 기억해야할 사항들을 정리해보겠다. 뷰 생성자를 오버라이딩 해준다. class CustomDropDown @JvmOverloads constructor( mContext: Context, attrs: AttributeSet? = null, defStyle: Int = 0 ) : LinearLayout(mContext, attrs, defStyle) { //... } @JvmOverloads 어노테이션을 붙이면 mContext, attrs, defStyle로 만들 수 있..