Hey StackOverflow-Community.EditText und Textview nicht im Layout angezeigt
Ich arbeite gerade an einer Android-App und ich habe ein Problem mit dem Layout eines Fragments.
Mein Problem ist, dass die Textansichten und Edittexte nicht angezeigt werden, sie sind wie Squeeze in den Layout-Design-Modus von Android Studio. Das gleiche gilt, wenn ich die App im Emulator starte. Ich verwende eine relativeLayout und die Schwerkraft ist auf den unteren Rand gesetzt.
Ich habe versucht, andere Sache wie die Schwerkraft, die Layouthöhe für die relativeLayout und die TextView/editText ändern, aber nichts funktioniert. Hier ist die XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
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"
tools:context="com.project.vincent.activityplanner.InfoPanelActivity"
android:gravity="bottom">
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
android:background="@color/white"
android:layout_above="@+id/textView3"
android:text="test" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
android:background="@color/white"
android:layout_alignParentStart="true"
android:layout_above="@+id/dateStart"
android:text="test" />
<TextView
android:id="@+id/textView4"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:visibility="visible"
android:background="@color/white"
android:layout_alignParentStart="true"
android:layout_above="@+id/dateStart"
android:layout_alignBottom="@+id/dateStart"
android:text="Start" />
<EditText
android:id="@+id/dateStart"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:layout_toStartOf="@+id/timeStart"
android:layout_alignBottom="@+id/timeStart" />
<EditText
android:id="@+id/timeStart"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="time"
android:ems="10"
android:layout_above="@+id/timeEnd"
android:layout_alignParentEnd="true" />
<TextView
android:id="@+id/textView5"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:visibility="visible"
android:background="@color/white"
android:layout_alignParentStart="true"
android:layout_above="@+id/dateEnd"
android:text="Start" />
<EditText
android:id="@+id/dateEnd"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:layout_toStartOf="@+id/timeEnd"
android:layout_alignBottom="@id/timeEnd"/>
<EditText
android:id="@+id/timeEnd"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:inputType="time"
android:ems="10"
android:layout_above="@+id/ratingBar"
android:layout_alignParentEnd="true" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save" />
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true" />
</RelativeLayout>
Nur die Taste speichern und die Bewertungsleiste werden korrekt angezeigt.
Layout-Ergebnis
Layout-Erwartung
Wenn Sie eine Idee haben, wie dieses Problem lösen würde ich schätzen wirklich Ihre Hilfe.
Dank
, was Sie führen wollen, Screenshot – USKMobility
Aktien Ihre Mockup anhängen hier – Darshak
Ich habe meinen Beitrag gerade bearbeitet das Ergebnis erwartet hinzuzufügen.Danke – Gnarkkkkk