Ich habe ein Layout, das wie folgt aussieht,-Taste, um unteren Teil des Bildschirms
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/layout1" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
Ich möchte die Schaltfläche am unteren Rand des Bildschirms angezeigt werden, die, wenn sie mit einem activity.When verwenden funktioniert gut ich versuche, benutze es jedoch mit einem Fragment (in einem FrameLayout) wird der Button überhaupt nicht angezeigt. Irgendwelche Vorschläge?
EDIT
Vielen Dank für Ihre Antworten, aber ich habe bereits versucht alle that.Let mich klarstellen something.I ein Haupt Layout haben, die eine Toolbar
und ein Framelayout
.Dieses FrameLayout
enthält für meine verwendet wird 4- 5 App's Fragments
. Einer von ihnen hat das vorherige Layout ich gepostet.
versuchen relativelayout verwenden. Legen Sie dann die Eigenschaft auf align_ParentBottom = true fest. Es wird am unteren Rand zeigen, egal was – Umair
gehen durch diese http://stackoverflow.com/questions/3482742/gravity-and-layout-gravity-on-android/40080065#40080065 – sushildlh
Hallo @ tasgr86 ist es zwingend FrameLayout zu verwenden. .? –