[HP Top] |
Layout's Overview †縲縲縲The UI of application can be set by the combination of View and ViewGroup. View and ViewGroup †縲縲縲繝サThe set of Veiw is ViewGroup. ViewGroup surrounding Class 縲縲 †縲縲縲縲"ViewGroup" and its succession relations are described as follows. 縲縲 Kind of layout †
竇シ拶bsolute layout †縲縲縲縲繝サLayout specified by using [absolute coordinate] 縲縲縲縲縲 XML attribute which absolute coordinate is specified in †縲縲縲ス鯉スス呻ス擾ス包ス農ス倥 XML attribute which width and height of parts are specified in †縲縲縲ス鯉スス呻ス擾ス包ス農ス暦ス会スス費ス 竇。シ山elative layout †縲縲縲縲Layout which specify the relative position of widget. Can be specified placed in the top or bottom.
縲縲縲縲悟渕貅悶ョ菴咲スョ繧貞、画峩縺吶l縺ー縲√◎繧後↓莨エ縺縺サ縺九ョ繧ヲ繧」繧ク繧ァ繝繝医b閾ェ蜍慕噪縺ォ菴咲スョ縺瑚ェソ謨エ縺ァ縺阪k縲阪梧万繧√d蜀蠖「縺ォ繧る咲スョ縺悟庄閭ス縲阪→縺縺繝。繝ェ繝繝医′縺ゅk荳譁ケ縲 竇「シ鮫inear layout †縲縲縲縲Liner Layout is the layout which arrange widgets at straight vertical or horizontal. 縲縲縲縲縲縲縲縲縲縲 竇」シ撒able layout †縲縲縲This layout can arranged widget in a tabular. 縲縲縲縲縲縲縲 竇、シ薩rame layout †縲縲縲縲Frame layout is easy to use when stacking the View. 縲縲縲縲縲縲縲
Practical use †Half-and-half †縲縲縲
縲縲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 †縲縲縲繝サス趣スス假ス費シヲス擾ス假ス包ス難シ、ス擾ス暦ス - 繝輔か繝シ繧ォ繧ケ縺御ク区婿蜷代↓驕キ遘サ縺励◆譎ゅョ驕キ遘サ蜈View繧貞ョ夂セゥ Property of ViewGroup †縲縲 Units of represent †縲縲縲Unit that can be used by layout
Portrait and landscape layout †縲縲縲The Horizontal screen, Use "Layout-land" Folder.
|