티스토리 뷰
-배경 drawable 리소스 지정
dialog?.window?.setBackgroundDrawableResource(R.drawable.rounded_all_corners)
-width, height 지정
val size = resources.displayMetrics.widthPixels
dialog?.window?.setLayout(size, ViewGroup.LayoutParams.WRAP_CONTENT)
view.window.속성지정()
이 방법은 여러 뷰들의 속성 지정할때 잘 사용될것같다
ViewGrop.LayoutParams. 해서 레이아웃의 파라메터 ? 직접 가져와 설정하는것도 자주 사용할수 있을것같다
DialogFragment의 size(width, height)조절 · 쾌락코딩
DialogFragment의 size(width, height)조절 23 Nov 2019 | DialogFragment 마음처럼 되지 않는 DialogFragment 액티비티나 프레그먼트 위에서 DialogFragment를 띄우다 보면 DialgFragment의 전체 크기 조절이 마음처럼 되지 않
wooooooak.github.io
https://stackoverflow.com/questions/12478520/how-to-set-dialogfragments-width-and-height
How to set DialogFragment's width and height?
Let's say I specify the layout of my DialogFragment in an xml layout file named my_dialog_fragment.xml and I specify the layout_width and layout_height values of its root view to a fixed value (e.g.
stackoverflow.com
'공부 > Android' 카테고리의 다른 글
| 오늘 마주친.. 이상한 오류 (0) | 2023.07.06 |
|---|---|
| DataBinding, data에 있는 string 을 string.xml 에 있는 문자열에 값넣기 (0) | 2023.07.02 |
| .mem: Background young concurrent copying GC freed 193995(11MB) AllocSpace objects, 0(0B) LOS objects, 28% free, 13MB/18MB, paused 6.774ms,5.016ms total 570.950ms (0) | 2023.06.23 |
| LiveData 의 value가 null을 반환할때 (0) | 2023.05.05 |
| socket.io 사용할때 뒤로가기 눌렀을때 앱 종료되는 이유? (0) | 2022.11.07 |
