티스토리 뷰
-배경 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. 해서 레이아웃의 파라메터 ? 직접 가져와 설정하는것도 자주 사용할수 있을것같다
https://stackoverflow.com/questions/12478520/how-to-set-dialogfragments-width-and-height
'공부 > 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 |