<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:orientation="vertical" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.example.jikexueyuan.layout.MainActivity" tools:showIn="@layout/activity_main"> <LinearLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp"> <EditText android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" android:background="#FF0"/> <EditText android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" android:background="#00FF00"/> <EditText android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" android:background="#000"/> <EditText android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" android:background="#00F"/> </LinearLayout> <LinearLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical"> <EditText android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" android:background="#F77"/> <EditText android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" android:background="#0FF"/> <EditText android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" android:background="#FF00"/> <EditText android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dp" android:background="#F66"/> </LinearLayout> </LinearLayout>
Android中LinearLayout框架使用案例26Days TO_1
最新推荐文章于 2020-08-06 12:38:59 发布