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
- Behavior
- 알림
- 백준
- CollapsingToolbarLayout
- HTTP
- Navigation
- room
- CustomView
- CoordinatorLayout
- ViewModel
- 알고리즘
- notification
- View
- 안드로이드
- BOJ
- hilt
- Android
- Algorithm
- AppBarLayout
- onMeasure
- DataBinding
- lifecycle
- kotlin
- LiveData
- Coroutine
- recyclerview
- 코틀린
- activity
- onLayout
- sqlite
Archives
- Today
- Total
개발일지
삽질 - Android Dialog match_parent 본문
안드로이드에서 Dialog를 Custom해서 만들 때 layout_width와 layout_height를 match_parent로 해도 꽉 차지 않는데 이는 Dialog의 window가 wrap_content이기 때문이다. => window의 크기를 바꾸면 된다.
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
반드시 setContentView를 호출한 다음 바꿔야한다.
'삽질' 카테고리의 다른 글
삽질 - TextInputLayout AutoCompleteTextView setSelection (0) | 2021.03.10 |
---|---|
삽질 - 주석 안될 때 (Ctrl + /) / 단축키 안될 때 (0) | 2021.03.02 |
삽질 - CoordinatorLayout, ViewPager (0) | 2021.01.26 |
삽질 - Navigation, ViewPager, setAdapter 오류 (0) | 2021.01.26 |
삽질 - StaggeredGridLayoutManager Margin (0) | 2021.01.20 |
Comments