Hier ist das XML-Layout meiner Fragment AnsichtWie ändere ich die Größe eines Fragments in Android?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:weightSum="100"
>
<fragment
android:id="@+id/menuFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="70"
class="com.pack.Menufragment" >
</fragment>
<fragment
android:id="@+id/bodyFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="30"
class="com.pack.BodyFragment" >
</fragment>
</LinearLayout>
Jetzt will ich von der Java von XML nicht die Fragmente Gewichtsgröße ändern, ist es dies trotzdem zu tun?
Ich tat dies, aber es zeigt keinen Fehler, aber auch nicht in der Größe Wirkung –