布局"/>
基本布局
没有方便的定位方式,所有控件都会默认的摆放在布局的左上角。有叠加效果。调整位置通过对齐方式调整
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android=""xmlns:app=""xmlns:tools=""android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Hello World!"android:textColor="#444444"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent"app:layout_constraintTop_toTopOf="parent" /><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@mipmap/ic_launcher"/><!--因为ImageView在TextView后面所以图片压在文字上面--></FrameLayout>
更多推荐
基本布局
发布评论