Android Layout
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
|
Help
]
Start:
''[[MobileApp>Mobile Application Guide]]'' > ''[[Android>...
~
~
*Layout's Overview [#sb77194a]
The UI of application can be set by the combination...
~
~
**View and ViewGroup [#y454ce88]
・The set of Veiw is ViewGroup. ~
・ViewGroup contains two or more View. ~
・ViewGroup can be contained in ViewGroup. ~
・The layout inherit ViewGroup. ~
※Refer to the following succession charts for the p...
~
**ViewGroup surrounding Class [#b370a8dc]
"ViewGroup" and its succession relations are desc...
&ref(ViewGroup.gif,nolink);
~
*Kind of layout [#k84d3564]
~
Typical View-Groups (layouts) are described as fo...
#style(class=table_left){{
|Ⅰ| Absolute layout | The layout placement which speci...
|Ⅱ| Relative layout | The layout placement which speci...
|Ⅲ| Linear layout | Horizontal direction and the ver...
|Ⅳ| Table layout | The table form can be arranged. ...
|Ⅴ| Frame layout | Overlapping the VIEW is possible...
|| the others ||
~
**Ⅰ.Absolute layout [#ye06868a]
・Layout specified by using [absolute coordinate]~
・It became non-recommendation from SDK1.5. (Bec...
~
&ref(absolute.gif,nolink); &ref(absolute2.gif,no...
~
***XML attribute which absolute coordinate is specified i...
layout_x ~
layout_y ~
~
***XML attribute which width and height of parts are spec...
layout_width~
layout_height~
fill_parent is MAX size. wrap_con...
~
~
**Ⅱ.Relative layout [#t95a1616]
Layout which specify the relative position of wi...
~
&ref(relative.gif,nolink);&ref(relative2.gif,nolink...
「基準の位置を変更すれば、それに伴いほかのウィジェ...
「気軽にウィジェットを追加・削除できない」、「どの...
~
~
**Ⅲ.Linear layout [#j52dd8c3]
Liner Layout is the layout which arrange widgets ...
&ref(liner.gif,nolink); &ref(liner2.gi...
~
~
**Ⅳ.Table layout [#w8af4a08]
This layout can arranged widget in a tabular.
&ref(tablelayout2.png,nolink); &ref(tablelay...
Outline ...
~
~
~
~
**Ⅴ.Frame layout [#p1539b7e]
Frame layout is easy to use when stacking the Vie...
For example, when overlaying images is available.
~
&ref(FrameLayout01.gif,nolink); &ref(FrameLa...
Outline ...
~
~
~
*Practical use [#x63c4c9f]
**Half-and-half [#ycf583ce]
&ref(hanbun.png);
~
If you want to set half-and-half to buttons layout ,~
Use "LinearLayout",and assign 0 to "layout_width",a...
~
~
Example of layout.xml
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="0dip"
android:layout_weight="1"
android:text="before"
android:id="@+id/Button01"
android:layout_height="wrap_content" >
</Button>
<Button
android:layout_width="0dip"
android:layout_weight="1"
android:text="next"
android:id="@+id/Button02"
android:layout_height="wrap_content"
android:layout_alignParentRight="true">
</Button>
</LinearLayout>
~
~
~
~
*Property of View [#tcf6cd7d]
[[参考 - Android Wiki>http://wikiwiki.jp/android/?U...
・nextFoxusDown - フォーカスが下方向に...
・padding - 上下左右のパディングを設定~
・scrollbarAlwaysDrawVerti...
~
**Property of ViewGroup [#tcf6cd7d]
[[参考 - Android Wiki>http://wikiwiki.jp/android/?U...
~
~
~
~
**Units of represent [#ya5409d4]
Unit that can be used by layout~
#style(class=table_left){{
|px| pixels |
|dp| Density Independent Pixels |
|sp| Scale Independent Pixels |
|mm| millimeter |
|pt| Point |
|in| Inch |
~
~
~
~
*Portrait and landscape layout [#z4bb8c77]
The Horizontal screen, Use "Layout-land" Folder.
#ref(layout-land.jpg,nolink);
~
//*その他 [#t9aed44b]
//リソースマネージャで各解像度毎のレイアウトを切り替えが...
~
''[[Back>Introduction to Android]]''
End:
''[[MobileApp>Mobile Application Guide]]'' > ''[[Android>...
~
~
*Layout's Overview [#sb77194a]
The UI of application can be set by the combination...
~
~
**View and ViewGroup [#y454ce88]
・The set of Veiw is ViewGroup. ~
・ViewGroup contains two or more View. ~
・ViewGroup can be contained in ViewGroup. ~
・The layout inherit ViewGroup. ~
※Refer to the following succession charts for the p...
~
**ViewGroup surrounding Class [#b370a8dc]
"ViewGroup" and its succession relations are desc...
&ref(ViewGroup.gif,nolink);
~
*Kind of layout [#k84d3564]
~
Typical View-Groups (layouts) are described as fo...
#style(class=table_left){{
|Ⅰ| Absolute layout | The layout placement which speci...
|Ⅱ| Relative layout | The layout placement which speci...
|Ⅲ| Linear layout | Horizontal direction and the ver...
|Ⅳ| Table layout | The table form can be arranged. ...
|Ⅴ| Frame layout | Overlapping the VIEW is possible...
|| the others ||
~
**Ⅰ.Absolute layout [#ye06868a]
・Layout specified by using [absolute coordinate]~
・It became non-recommendation from SDK1.5. (Bec...
~
&ref(absolute.gif,nolink); &ref(absolute2.gif,no...
~
***XML attribute which absolute coordinate is specified i...
layout_x ~
layout_y ~
~
***XML attribute which width and height of parts are spec...
layout_width~
layout_height~
fill_parent is MAX size. wrap_con...
~
~
**Ⅱ.Relative layout [#t95a1616]
Layout which specify the relative position of wi...
~
&ref(relative.gif,nolink);&ref(relative2.gif,nolink...
「基準の位置を変更すれば、それに伴いほかのウィジェ...
「気軽にウィジェットを追加・削除できない」、「どの...
~
~
**Ⅲ.Linear layout [#j52dd8c3]
Liner Layout is the layout which arrange widgets ...
&ref(liner.gif,nolink); &ref(liner2.gi...
~
~
**Ⅳ.Table layout [#w8af4a08]
This layout can arranged widget in a tabular.
&ref(tablelayout2.png,nolink); &ref(tablelay...
Outline ...
~
~
~
~
**Ⅴ.Frame layout [#p1539b7e]
Frame layout is easy to use when stacking the Vie...
For example, when overlaying images is available.
~
&ref(FrameLayout01.gif,nolink); &ref(FrameLa...
Outline ...
~
~
~
*Practical use [#x63c4c9f]
**Half-and-half [#ycf583ce]
&ref(hanbun.png);
~
If you want to set half-and-half to buttons layout ,~
Use "LinearLayout",and assign 0 to "layout_width",a...
~
~
Example of layout.xml
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="0dip"
android:layout_weight="1"
android:text="before"
android:id="@+id/Button01"
android:layout_height="wrap_content" >
</Button>
<Button
android:layout_width="0dip"
android:layout_weight="1"
android:text="next"
android:id="@+id/Button02"
android:layout_height="wrap_content"
android:layout_alignParentRight="true">
</Button>
</LinearLayout>
~
~
~
~
*Property of View [#tcf6cd7d]
[[参考 - Android Wiki>http://wikiwiki.jp/android/?U...
・nextFoxusDown - フォーカスが下方向に...
・padding - 上下左右のパディングを設定~
・scrollbarAlwaysDrawVerti...
~
**Property of ViewGroup [#tcf6cd7d]
[[参考 - Android Wiki>http://wikiwiki.jp/android/?U...
~
~
~
~
**Units of represent [#ya5409d4]
Unit that can be used by layout~
#style(class=table_left){{
|px| pixels |
|dp| Density Independent Pixels |
|sp| Scale Independent Pixels |
|mm| millimeter |
|pt| Point |
|in| Inch |
~
~
~
~
*Portrait and landscape layout [#z4bb8c77]
The Horizontal screen, Use "Layout-land" Folder.
#ref(layout-land.jpg,nolink);
~
//*その他 [#t9aed44b]
//リソースマネージャで各解像度毎のレイアウトを切り替えが...
~
''[[Back>Introduction to Android]]''
Page: