I'm new in the android programming.
I made a new view in the android studio but the emulator doesn't show it like the preview. I don't have any idea what the reason is.
The ConstraintLayout was default. Is it possible to use another one? Why are all my elements at the top of the view? Is a attribute missing?
XML code :
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.DetailDeviceInformation">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_weight="0.11"
android:orientation="horizontal"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="147dp">
<TextView
android:id="@+id/weight_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.18"
android:text="@string/gewicht"
android:textAlignment="gravity"
android:textSize="20sp"
android:textStyle="bold" />
<Spinner
android:id="@+id/weightDropdown"
android:layout_width="190dp"
android:layout_height="match_parent"
android:layout_weight="0.00" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="39dp"
android:layout_weight="0.07"
android:orientation="horizontal"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="204dp">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="4.26"
android:text="@string/wiederholungen"
android:textAlignment="gravity"
android:textSize="20sp"
android:textStyle="bold" />
<Spinner
android:id="@+id/repetitionDropdown"
android:layout_width="190dp"
android:layout_height="match_parent"
android:layout_weight="0.07" />
</LinearLayout>
<Button
android:id="@+id/saveButton"
android:layout_width="match_parent"
android:layout_height="62dp"
android:layout_weight="0.07"
android:text="@string/button"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="418dp"
tools:text="Speichern" />
</android.support.constraint.ConstraintLayout>