Ich habe die folgende XML:Android Text ist in Knopf eingewickelt - warum?
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/verylongtext" android:layout_weight="1000" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sometext" android:onClick="onClickButton" android:layout_weight="1" />
</LinearLayout>
Obwohl ich einen layout_weight gesetzt haben es noch einen Zeilenumbruch auf den Button im Text ist, sollte die Taste
sometext
zeigen, aber es zeigt
somet
ext
Warum ist das und wie kann ich es beheben?
Danke!
für die Schaltfläche muss es wrap_content und für die Schaltfläche 0dp/px sein. – AndyAndroid