layout_gravity(3)
-
GridLayout (그리드레이아웃)
GridLayout GridLayout 격자 모양의 표을 만들 수 있는 레이아웃.GridLayout은 API 14(안드로이드 4.0)부터 사용 가능하기 때문에 AndroidManifest.xml의 minSdkVersion을 14이상으로 설정해줘야 사용 가능합니다. 이하 버전일 경우 인스톨이 되지 않고 에러가 납니다. 인스톨이 되었어도 기능사용시 에러가 날 수 있습니다. AndroidManifest.xml GridLayout 태그에 지정하는 속성 속성설명orientation배치의 방향을 지정. 가로(vertical) 우선, 세로(horizontal) 우선으로 지정할 수 있으며 디폴트는 horizontalcolumnCount최대 열 개수를 지정. 한 행이 이 개수를 초과하면 아래 행으로 자동 개행.rowCo..
-
LinearLayoutDemo3-Layout_gravity로 버튼 위치 지정하기
Layout_gravity로 버튼 위치 지정하기 강의 내용 activity_main.xml LinearLayout 변경 -android:orientation="vertical" Graphical Layout > Form Widgets-Button추가 -android:layout_width="match_parent" -android:layout_height="match_parent" Graphical Layout > Form Widgets-Button추가 -android:layout_width="wrap_content" -android:layout_height="wrap_content" -android:layout_gravity="center_horizontal" 확인 출력 결과
-
컨테이너(Container)
컨테이너 종류 구분설명LinearLayout박스 모델, 즉 위젯이나 다른 하위 컨테이너가 가로나 세로 방향으로 하나씩 차례로 정렬되는 레이아웃을 지원합니다..RelativeLayout자식 뷰들을 상대적인 관계에 따라 배치됩니다.FrameLayout여러 자식 뷰들을 겹쳐서 그리고자 할 때 사용하는 레이아웃. 이 레이아웃은 여러 이미지들을 같은 영역에 표시하고자 할 때 사용합니다.TableLayout자식 뷰들을 열과 행으로 조직화된 표 형태로 배치합니다.GridLayout 격자 모양의 표을 만들 수 있는 레이아웃 Layout 속성 layout_widthfill model 속성으로 넓이 채우기layout_heightfill model 속성으로 높이 채우기orientation방향 설정padding여유공간 설정w..