본문 바로가기

IT이야기/Android

wrap_content와 match_parent

wrapContent 내용물 크기만큼 뷰의 크기 설정
matchParent 부모의 크기만큼 뷰의 크기 설정

 

TextView size

 

width = 200dp

height = 200dp

 

 

 

 

 

 

 

 

 

 

 

 

width = wrap_content

height = 200dp

 

 

 

 

 

 

 

 

 

 

 

 

width = wrap_content

height = wrap_content

 

 

 

 

 

 

 

 

 

 

 

 

width = match_parent

height = wrap_content

'IT이야기 > Android' 카테고리의 다른 글

padding과 margin  (0) 2019.09.13