<Button
            android:id="@+id/Button1"  // 唯一标识符
            android:layout_width="match_parent"  
        // layout_width 指定当前元素的宽度
        // match_parent 让当前元素和父元素一样宽
            android:layout_height="wrap_content"
        // layout_height 指定当前元素的高度
        // 表示当前元素的高度只要能刚好包含里面的内容
            android:text="Button 1"
        // 指定了当前元素中显示的内容
    />
原文:https://www.cnblogs.com/hulian425/p/13747540.html