일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- View
- sqlite
- 안드로이드
- onMeasure
- recyclerview
- Coroutine
- BOJ
- kotlin
- DataBinding
- activity
- LiveData
- ViewModel
- HTTP
- onLayout
- AppBarLayout
- hilt
- 알고리즘
- notification
- lifecycle
- Behavior
- 코틀린
- Android
- Algorithm
- CoordinatorLayout
- 백준
- room
- CustomView
- Navigation
- 알림
- CollapsingToolbarLayout
- Today
- Total
목록커스텀 (3)
개발일지
View가 그려지는 순서는 measure -> layout -> draw 과정을 거친다. 또한 전위순회 방식(부모를 그리고 자식을 형제순으로) 으로 그린다. Measure measure(widthMeasureSpec: Int, heightMeasureSpec: Int) View의 크기를 측정하는 과정이다. final 함수이지만 내부적으로 onMeasure를 호출하고 onMeasure를 재정의하여 사용할 수 있다. 아직 ChildView는 measure된 상태가 아니기 때문에 width, measuredWidth 는 0이 반환될 수 있다. setMeasureDimension(measuredWidth: Int, measuredHeight: Int) View의 크기를 측정한다. onMeasure에서 필수적으로..

Notification Custom 사용자가 직접 Layout을 구성하여 RemoteView를 통해 Nofitication 템플릿을 만들 수 있습니다. * 보통 축소된 Notification은 64dp, 확장된 Notification은 256dp로 제한됩니다. RemoteViews를 만들고setCustomContentView를 통해 적용할 수 있다. * 확장된 CustomContentView는 setCustomBigContentView를 통해 적용할 수 있다. private fun createCustomContentView(): RemoteViews { return RemoteViews(context.packageName, R.layout.notification_content_view).apply { s..

CustomView Android에서 기본으로 제공하는 View로 UI를 구축할 수 없을 때 사용자가 직접 View를 상속받아서 CustomView를 만들 수 있다. ProgressView 전체코드 class ProgressView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0) : View(context, attrs, defStyleAttr, defStyleRes) { private val progressBarBackgroundPaint = Paint().apply { isAntiAlias = true style = Paint.Style.ST..