迷迷糊糊的XML布局

<?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:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <EditText
        android:id="@+id/edit_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:hint="在此输入"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/button4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button4"
        android:textAllCaps="false" />
</LinearLayout>

在这里插入图片描述

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Back"
        android:textAllCaps="false"
        android:layout_gravity="top"
        android:layout_margin="5dp" />
    <TextView
        android:id="@+id/text_Test"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="Test"
        android:textAlignment="center"
        android:textColor="#000000"
        android:textSize="25sp" />
    <Button
        android:id="@+id/Button_Back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Edit"
        android:textAllCaps="false"
        android:layout_gravity="top"
        android:layout_margin="5dp"/>
</LinearLayout>

在这里插入图片描述

posted @ 2022-03-05 23:10  在天边偷看小天使  阅读(7)  评论(0)    收藏  举报  来源