Warum fügt der Datepicker meiner Ansicht einen Kalender hinzu?


Ich fange an zu lernen, wie man sich auf Android entwickelt. Es ist ziemlich einfach, aber ich stehe vor einem Problem, das ich nirgendwo erwähnt habe ...

Ich habe eine Aussicht:

<?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>

Welches zeigte einen Datepicker. Die Sache ist, dass die Datumsauswahl neben den klassischen Rollen für die Datumsauswahl einen Kalender hinzuzufügen scheint (siehe Bild). Ich will diese Ansicht nicht, juste die Walze für das Datum. Benutz ich die Datumsauswahl falsch oder ist dies das ursprüngliche Verhalten? Vielen Dank !

Guillaume

Antworten auf die Frage(5)

Ihre Antwort auf die Frage