Mein EditText und ImageButton erscheinen nicht wegen falscher Positionierung. Fragment erfolgreich auftauchen.Android - Falsche Layout-Positionierung
Hier ist mein Layout-Ansicht Code
<ListView
android:id="@+id/msgListView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/form"
android:divider="@null"
android:dividerHeight="0dp"
android:paddingBottom="10dp"
android:text="Hello World" />
<LinearLayout
android:id="@+id/form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#91f1f1f1"
android:orientation="horizontal"
android:paddingBottom="2dp" >
<EditText
android:id="@+id/messageEditText"
android:layout_width="252dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/button1"
android:layout_toLeftOf="@+id/sendMessageButton"
android:layout_weight="0.72"
android:ems="10"
android:maxHeight="80dp" />
<ImageButton
android:id="@+id/sendMessageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="@drawable/send_button"
android:text="d" />
</LinearLayout>
Meine vollständigen Quellcode hier https://github.com/IntellijSys/AndroidChat ist.
Bitte um Rat. Vielen Dank.
seit wann brauche ich RecyclerView? Alle IDs sind bereits geändert. –
Sie können IDs nach Ihren Wünschen einrichten oder Sie können Ihren ListView auch an der Stelle von RecyclerView verwenden. – UltimateDevil
Implementieren Sie dieses Layout in Ihren Code und ändern Sie die IDs entsprechend. – UltimateDevil