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>

編輯框在圖片上


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM