【发布时间】:2020-06-20 08:38:51
【问题描述】:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:src="@drawable/androidparty" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DEALS IN:-"
android:padding="10dp"/>
</LinearLayout>
</RelativeLayout>
在相对布局中,当我将高度和重量设置为 match_parent 时,我的文本滑到设计面板的底部并且不可见,为什么会发生这种情况?
【问题讨论】:
标签: android xml android-layout layout