我有一個RelativeLayout的2個Textviews這樣的:相對佈局錯誤。 「不是兄弟」
<RelativeLayout>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
(*) android:layout_above="@+id/message"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" />
<ScrollView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1">
<TextView
android:id="@+id/message"
android:layout_width="302dp"
android:layout_height="wrap_content"
android:layout_above="@+id/editText1"/>
</ScrollView>
我想TextView的id'd 「消息」 是滾動的。所以我添加它在一個滾動視圖,但我已經把一個明星(android:layout_above)我得到的錯誤:@ + ID /消息是不是兄弟在同一RelativeLayout
我該如何解決這個問題?任何幫助表示讚賞
它的作品有「+」,但你寫的是正確的。我們應該只在給id時使用+,而不是在使用時使用+。 –