Ich fange an zu lernen, wie man auf Android entwickelt. Es ist ziemlich einfach, aber ich bin vor ein Problem, das ich keine Erwähnung finden überall haben ...Warum fügt der Datepicker in meiner Ansicht einen Kalender hinzu?
Ich habe einen Blick:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<EditText
android:id="@+id/editNomProduit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/ht_nom_produit" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal">
<TextView
android:id="@+id/labelQuantiteProduitEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/labelQuantiteProduitEdit"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editQuantite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number" />
<Spinner
android:id="@+id/spinnerUnite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal">
<TextView
android:id="@+id/labeDateAchatProduitEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/labelDateAchatProduitEdit"
android:textAppearance="?android:attr/textAppearanceMedium" />
<DatePicker
android:id="@+id/dpDateAchatProduit"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
, die eine Datumsauswahl angezeigt. Die Datumsauswahl scheint neben den klassischen Rollen für den Datumsauswahl einen Kalender hinzuzufügen (siehe Bild). Ich will diese Ansicht nicht, juste die Rolle für das Datum. Wende ich die Datumsauswahl falsch an oder ist dies das ursprüngliche Verhalten? Danke!
Guillaume
Tat dies sehr geholfen! Danke – Guigui
Mein Vergnügen, froh, dass es geholfen hat – CocoNess
Das ist falsch! Es funktioniert nicht mit Android 5.0! – Mulgard