android控件层次

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.goodness.test.MainActivity">
        <ImageView
            android:src="@drawable/fire"
            android:layout_width="match_parent"
            android:layout_height="300dp" />
        <EditText
            android:layout_alignParentTop="true"
            android:layout_width="300dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="10dp"
            android:layout_marginStart="10dp"
            android:textColor="@color/colorAccent"
            android:textColorHint="@color/colorAccent"
            android:textSize="50sp"
            android:hint="@string/app_name"/>
</RelativeLayout>

编辑框在图片上

原文地址:https://www.cnblogs.com/thankyouGod/p/6365981.html