说一句:绝对布局,谷歌官方那边现在已经不推荐我们使用了,所以,了解即可。
1.概念:
2.代码示例:
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout 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:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="世界真好"
android:layout_x="100dp"
android:layout_y="100dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</AbsoluteLayout>
3.图片: