Dirk Unverzagt
- Forum-Beiträge: 13
11.12.2010, 08:24:20 via Website
11.12.2010 08:24:20 via Website
Hi,
ich arbeite gerade das https://www.nextpit.de/de/android/wiki/view/Android_Anfänger_Workshop
Im Workshop sind die beiden Buttons neben einander. Bei Mir stehen sie aber untereinander
Kann mir da jemand auf die sprünge helfen ?
Mein Code sieht so aus:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/enter_your_name"
/>
<EditText
android:id="@+id/name_field"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/hi_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/hi_button"
/>
<Button
android:id="@+id/hello_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/hello_button"
/>
</LinearLayout>
mfg Dirk
ich arbeite gerade das https://www.nextpit.de/de/android/wiki/view/Android_Anfänger_Workshop
Im Workshop sind die beiden Buttons neben einander. Bei Mir stehen sie aber untereinander
Kann mir da jemand auf die sprünge helfen ?
Mein Code sieht so aus:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/enter_your_name"
/>
<EditText
android:id="@+id/name_field"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/hi_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/hi_button"
/>
<Button
android:id="@+id/hello_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/hello_button"
/>
</LinearLayout>
mfg Dirk
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.