I am starting to learn how to develop on Android. It is pretty straightforward but I'm facing an issue I did not find any mention anywhere...
I have a view :
<?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>
Which displayed a datepicker. The thing is that the date picker seems to add a Calendar besides the classic rollers for the date picker (see picture). I don't want this view, juste the roller for the date. Am I usign the date picker in the wrong way or is this the orignal behavior ? Thanks !
Guillaume
Do one of the following: For a text box control or a date picker control, ensure that the Data type list displays the appropriate data type, and then click Format. For an expression box control, ensure that the Format as list displays the appropriate data type, and then click Format.
To change the way that the date is displayed, double-click the date picker, click the Data tab, and then click the Format button. Choose a display format in the Date Format dialog box.
Add in a Date Picker in Access!Press F4 to open the Property Sheet. Select the desired date field from the Selection Type dropdown list at the top of the Property Sheet. Select the Format tab on the Property Sheet. In the Show Date Picker field, select For dates.
Add this line to your date picker xml
android:calendarViewShown="false"
This will remove the Calendar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With