- Forum-Beiträge: 609
25.05.2019, 22:24:11 via Website
25.05.2019 22:24:11 via Website
Hallo zusammen
Was ist der Unterschied zwischen LinearLayout und FrameLayout?
Mein Problem, ich möchte oben drei Titel mit TextView anzeigen und darunter drei Eingabefelder mit EditText einstellen. Nur werden mir die Eingabefelder nicht angezeigt. Ich habe schon diverses ausprobiert. Es kommt einfach nichts.
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/lay_mein"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Main">
<FrameLayout
android:id="@+id/lay_titel"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_lang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:text="@string/lbl_lang"
android:textColor="@android:color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/txt_breit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/lbl_breit"
android:textColor="@android:color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/txt_hoch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/lbl_hoch"
android:textColor="@android:color/black"
android:textStyle="bold" />
</FrameLayout>
<FrameLayout
android:id="@+id/lay_position"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:id="@+id/edt_lang"
android:layout_width="0"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:ems="10"
android:inputType="number"
android:visibility="visible" />
<EditText
android:id="@+id/edt_breit"
android:layout_width="0"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:ems="10"
android:inputType="number"
android:visibility="visible" />
<EditText
android:id="@+id/edt_hoch"
android:layout_width="0"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:ems="10"
android:inputType="number"
android:visibility="visible" />
</FrameLayout>
Mache ich einen Denkfehler?
Gruss Renato
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.