当前位置: 移动技术网 > IT编程>移动开发>Android > Android 线性布局 LinearLayout

Android 线性布局 LinearLayout

2019年11月01日  | 移动技术网IT编程  | 我要评论

王尹馨,卧龙吟何进势力,张定发黄海刺杀案

垂直布局 vertical

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    
    <button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="测试按钮1" />
    
    <button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="测试按钮2" />

</linearlayout>

水平布局 horizontal

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网