Ich kann diese 3 Tasten und 1 Text nicht in das relative Layout einfügen. Grundsätzlich war ich Listenansicht oben und dann eine relative Ansicht unter der Listenansicht. Diese relative Ansicht besteht aus Text in der ersten Zeile und 3 Schaltflächen in der zweiten Zeile.3 Tasten und 1 Text können nicht innerhalb eines relativen Layouts platziert werden
Alles funktioniert gut, aber, wenn ich 1 EditText setzen und 3 Tasten in relativ Layout, erhalte ich Fehler java.lang.IllegalStateException: Kreis Abhängigkeiten in RelativeLayout nicht existieren kann
Kann jemand bitte helfen, wirklich zu schätzen Ihre Zeit. Dank
<?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:id="@+id/activity_main"
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"
tools:context="app.com.date.MainActivity"
android:background="@color/common_google_signin_btn_text_light_disabled">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_above="@+id/messageBox"
android:id="@+id/chatroom"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
android:dividerHeight="0dp"
android:divider="@null"
android:layout_alignParentBottom="false"
android:layout_alignWithParentIfMissing="false" />
<EditText
android:layout_width="match_parent"
android:inputType="text"
android:ems="10"
android:id="@+id/messageBox"
android:textAppearance="@style/TextAppearance.AppCompat"
android:freezesText="true"
android:textSize="12sp"
android:fontFamily="sans-serif"
android:layout_alignParentBottom="false"
android:layout_above="@+id/sendButton"
android:breakStrategy="high_quality"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingBottom="15dip"
android:paddingTop="10dip"
android:hint="send message" />
<Button
android:id="@+id/galleryButton"
android:layout_below="@+id/messageBox"
android:layout_alignParentStart="false"
android:layout_alignParentBottom="false"
android:layout_width="50dip"
android:layout_height="wrap_content"
android:layout_centerHorizontal="false"
android:layout_alignParentLeft="true" />
<Button
android:id="@+id/cameraButton"
android:layout_below="@+id/messageBox"
android:layout_alignParentBottom="false"
android:layout_width="50dip"
android:layout_height="wrap_content"
android:layout_centerHorizontal="false"
android:layout_marginLeft="10dip"
android:layout_toRightOf="@+id/galleryButton" />
<Button
android:layout_height="wrap_content"
android:id="@+id/sendButton"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="15dip"
android:layout_width="75dip" />
</RelativeLayout>
Dieser Code für mich völlig in Ordnung funktioniert. Kreisförmige Abhängigkeiten treten auf, wenn die Referenzen zweier Ansichten aufeinander abgestimmt sind. Sagen Sie Button1 ist links von Button2 und Button2 ist rechts von Button1. Dies führt zu einem zyklischen Abhängigkeitsfehler. –
Dieser Code ist in Ordnung, aber ich möchte Text und 3-Taste in einem zusätzlichen relativen Layout setzen – user7327850
Outter Relative Layout - Listenansicht - innere relative Layout (Text bearbeiten, 3 Tasten) - Ende des inneren relativen Layout - Ende des äußeren relativen Layouts – user7327850