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