Ich versuche, Knopf zwischen zwei Listenansicht, die vertikal ausgerichtet sind. Kann jemand bitte helfen Sie mir mit dem Problem.Ich bin sehr neu zu Android, ich habe keine Ahnung, wie man das macht.Wie füge ich einen Button zwischen Listenansicht hinzu?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.edkul.vimal.edkul.Library"
android:id="@+id/linearLayout1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/library"
android:textSize="25sp"
android:id="@+id/textView27"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="35dp"
android:layout_below="@+id/textView27">
<ListView
android:id="@+id/list_item1"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="55dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="#88FF0000">
</ListView>
<ListView
android:id="@+id/list_item3"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="#88FF0000">
</ListView>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_below="@+id/linearLayout2"
android:layout_height="match_parent"
android:text="Button1"/>
</RelativeLayout>
Ich denke, das ist nicht Ihr gesamter Layout-Code Einige Start-Tags fehlen. So pls plom Whole Layout-Code mit dem richtigen Format. –
Wie ist Ihr Elternlayout? Bitte posten Sie die gesamte XML-Datei. Code fehlt hier. –
Pls erklären mehr, wo der Knopf sein soll, den Sie zwischen Listenansicht unten oder genau zwischen beiden Listenansichten wollen. Bitte angeben. –