Reputation: 41
i use DatePicker like this
<DatePicker
android:id="@+id/DatePicker"
android:layout_width="match_parent"
android:layout_height="200sp"
android:calendarViewShown="false">
</DatePicker>
this how they look is
How to change DatePicker format to be dd/MM/yyyy, and how to change the months name to be like "Januari, Februari, Maret, April, Mei, ... [indonesian]" ?
Upvotes: 3
Views: 107
Reputation: 13555
If you want custom months i suggest you to take String array
public static final String[] MONTHS = {"Januari", "Februari", "Maret", "April", .........so on};
either take switch statement
String monthName;
switch(mMonth){
case Calendar.JANUARY:
monthName = "Januari";
break;
case Calendar.FEBRUARY:
monthName = "Februari";
break;
Upvotes: 1