我有一个包含两个 TextViews 的 RelativeLayout,第二个应该低于第一个。第一个 TextView 的文本在 onCreate() 中更新,文本包含换行符,使其更高,但第二个 TextView 在此之后没有重新定位,导致它们重叠。我该如何解决这个问题?
<RelativeLayout
android:id="@+id/layout_parent"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/textView_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textView_top"/>
</RelativeLayout>