mein Name ist Josh. Ich versuche, das folgende Layout in Android zu erreichen, aber ich kann nicht scheinen, das innere Layout zu teilen, um das Layout zu bekommen, das ich will. Kann mir bitte jemand helfen.So erreichen Sie dieses Layout in Android (Studio)
Dies ist, was ich bisher:
<?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"
tools:context="com.example.firstapplication.myapplication.MainActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageView" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="Name"
android:ems="10"
android:id="@+id/editText" />
</LinearLayout>
</RelativeLayout>
Das einzige Problem, das ich habe, ist, dass ich nicht herausfinden kann, wie man das Layout spalten, wie im Bild gezeigt.
Hallo, ja ich suche nach einem 70:30/80:20 Verhältnis für die 2 Layouts –
@JoshDeo, schau dir den zweiten Teil meiner Antwort an. – Pztar
Ja, das ist was ich will, ein Problem, wenn ich einen EditText in Layout 2 einfüge, geht es entweder über das Layout oder drinnen und streckt das Layout. Ist es möglich, den Edittext auf volle Breite und Höhe des Layouts zu setzen, aber das Gewicht ohne Dehnung auf 0.3 zu belassen, –