<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/text1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="hello1"
android:layout_alignParentTop="true" android:layout_width="match_parent"/>
<TextView
android:id="@+id/text2"
android:text="hello2"
android:layout_below="@id/text1"
android:layout_alignParentTop="true"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
/>
</RelativeLayout>结果 hello1,与hello2重合了,android:layout_below="@id/text1"没起作用啊?
为什么?
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/text1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="hello1"
android:layout_alignParentTop="true" android:layout_width="match_parent"/>
<TextView
android:id="@+id/text2"
android:text="hello2"
android:layout_below="@id/text1"
android:layout_alignParentTop="true"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
/>
</RelativeLayout>结果 hello1,与hello2重合了,android:layout_below="@id/text1"没起作用啊?
为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货