Ich versuche, eine Schaltfläche (oder Schaltflächen) am unteren Rand der Ansicht und alles andere in einer Bildlaufansicht zu haben.Feste Schaltfläche am unteren Rand der Ansicht
Was immer ich mache, ich kann immer noch nicht die Schaltfläche unten (das gelbe Rechteck an der Unterseite des Bildes) haben, ich verstehe nicht genau warum.
Hier ist der Code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<TextView
android:id="@+id/txt_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/light_rose"
android:padding="20dp"
android:text="Contact"
android:textColor="@android:color/white"
android:textSize="30dp" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/footer"
android:layout_below="@+id/txt_title"
android:background="#0000ff"
android:fillViewport="true">
<TextView
android:id="@+id/texthere"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:text="test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test"
android:textSize="35sp"></TextView>
</ScrollView>
<RelativeLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:background="#ffff00">
<TextView
android:id="@+id/texthere2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="things in your footer here"
android:textSize="20sp" />
</RelativeLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
siehe Screenshot:
Kann mir jemand einen Hinweis geben?
Muchas Gracias. dies ersparte mir eine Menge Ärger – abdelghani
froh, dass ich helfen konnte. –