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 |
Tags
- kotlin
- DataBinding
- Behavior
- Navigation
- onMeasure
- recyclerview
- notification
- CoordinatorLayout
- Android
- 알고리즘
- onLayout
- CustomView
- room
- CollapsingToolbarLayout
- sqlite
- 코틀린
- activity
- hilt
- Coroutine
- HTTP
- View
- 안드로이드
- 백준
- lifecycle
- ViewModel
- 알림
- AppBarLayout
- Algorithm
- LiveData
- BOJ
Archives
- Today
- Total
목록Custom View (1)
개발일지
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/A7GGz/btrgDT6we0E/pS9iYP7kyjQv74PaTLPbj0/img.png)
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