티스토리 뷰
Android/Kotlin
[Android][Kotlin] 뷰 길이, 너비 구하기 (get view height programmatically)
yoo.o 2021. 1. 21. 18:19반응형
VIEW.viewTreeObserver.addOnGlobalLayoutListener {
// here your view is measured
// get height using my_view.height
// get width using my_view.width
}
테스트중
일단 constraint layout엔 됨
참고
stackoverflow.com/questions/21926644/get-height-and-width-of-a-layout-programmatically
Get height and width of a layout programmatically
I have designed an layout in which LinearLayout has 2 children LinearLayout and FrameLayout and in each child I put different views. I just wanted to measure height and width of FrameLayout so tha...
stackoverflow.com
반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 백준
- kotlin fragment
- 전화번호목록 파이썬
- 안드로이드 카카오톡으로 로그인
- flutter simultor
- 파이썬 최대공약수
- 백준 1806
- Kotlin
- 프로그래머스
- 코틀린 바텀네비게이션
- 코틀린 데이터바인딩
- 백준 1644
- 안드로이드 키해시
- 백준알고리즘
- 카카오톡으로 로그인 오류
- 코틀린 뷰페이저
- 투포인터 알고리즘 파이썬
- 코틀린
- 안드로이드
- 코틀린 리스트뷰
- 투포인터 알고리즘
- 백준 2003
- TextFormField keyboard
- 카카오 기출
- 소수 구하기 파이썬
- counting sort
- 데이터바인딩 뷰바인딩 차이
- 시뮬레이터 키보드
- 코틀린 뷰바인딩
- 카카오 키해시
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함