Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- onLayout
- Algorithm
- kotlin
- CollapsingToolbarLayout
- 알고리즘
- lifecycle
- DataBinding
- 안드로이드
- onMeasure
- hilt
- activity
- AppBarLayout
- HTTP
- sqlite
- View
- room
- 알림
- LiveData
- Behavior
- Coroutine
- notification
- ViewModel
- CustomView
- recyclerview
- CoordinatorLayout
- BOJ
- Navigation
- 코틀린
- Android
- 백준
Archives
- Today
- Total
목록Custom View (1)
개발일지

Activity와 Fragment가 생명주기를 갖는 것처럼 View도 생명주기를 갖는다. Constructor View(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0) context : 현재 테마와 리소스를 접근할 수 있도록 도와준다. 도한 동적으로 생성할 때 가장 간단한 방법이다. attrs : XML로 View를 Inflate할 때 XML로 속성을 받아오는 인터페이스다. defStyleAttr : 테마에서 기본 스타일을 지정할 수 있고, 기본 스타일에서 Attr값을 찾아와서 적용한다. defStyleRes : defStyleAttr에서 값을 찾을 수 없는 경우 defStyleRes를 사..
Android (안드로이드)/View
2021. 10. 4. 19:56