首页
IT
登录
6mi
u
盘
搜
搜 索
IT
让两个布局都在同一个控件的上方
让两个布局都在同一个控件的上方
xiaoxiao
2021-04-11
34
<?xml version="1.0" encoding="utf-8"?>
<
RelativeLayout
xmlns:android
=
"http://schemas.android.com/apk/res/android"
android:id
=
"@+id/activity_main"
android:layout_width
=
"match_parent"
android:layout_height
=
"match_parent"
android:orientation
=
"vertical"
>
<
View
android:id
=
"@+id/view_top1"
android:layout_width
=
"match_parent"
android:layout_height
=
"match_parent"
android:layout_above
=
"@+id/tv_test"
android:background
=
"@android:color/darker_gray"
/>
<
View
android:id
=
"@+id/view_top2"
android:layout_above
=
"@+id/tv_test"
android:layout_width
=
"match_parent"
android:layout_height
=
"match_parent"
android:background
=
"@android:color/holo_red_dark"
android:visibility
=
"gone"
/>
<
TextView
android:id
=
"@+id/tv_test"
android:layout_alignParentBottom
=
"true"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"Hello World!"
/>
</
RelativeLayout
>
转载请注明原文地址: https://ju.6miu.com/read-666570.html
技术
最新回复
(
0
)