모바일 프로그래밍(안드로이드) - 2

code++·2023년 10월 9일

뷰(위젯)

  • 앱 실행 화면을 구성하는 요소를 View(뷰)
  • UI에 보여지는 것 모두 View class를 상속

계층도

Button

  • id 속성
<Button
       android:id="@+id/btn1"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="배경색 변경"/>

match_parent : 부모 레이아웃에 폭이나 높이를 맞춤
wrap_content : 글자 들어갈 정도로 설정

  • backgroud 속성
  • padding 속성
  • layout_margin 속성
  • visibility 속성
  • enabled 속성
  • clickable 속성
  • rotation 속성

TextView

  • text
  • textColor
  • textSize
  • typeface
  • singleLine
profile
일상

0개의 댓글