LoginSignup
1
1

More than 5 years have passed since last update.

Android開発 メモ 〜入門編①〜

Posted at

レイアウト

・LinearLayout
1.横と縦方向にに並べて配置することができる
2.android:orientationで"vertical"または"horizontal"でどちらに並べるかを指定する。
android:layout_weightを使う際の注意
【verticalの場合】
layout_heightを"0dp"にする
【horizontalの場合】
layout_widthを"0dp"にする

・TableLayout
表組みのように配置することができる
・RelativeLayout
1.Viewからの位置を相対的に指定することができる
2.orientation使わない

・FrameLayout
Viewを重ねて配置することができる

・android:layout_height
Viewの縦のサイズ
・android:layout_width
Viewの横のサイズ
・android:padding
内側の余白
・android:layout_margin
外側の余白
・android:layout_gravity
Viewの中のコンテンツを上下左右に寄せる
・android:match_parent
親要素の幅に合わせる
・wrap_content
中身の幅に合わせる
・android:layout_alignLeft="@+id自分が指定したID"
指定IDの左側に寄せる

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1