Skip to content

Commit

Permalink
Handle myanmar appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed May 8, 2019
1 parent 9bab23e commit 48860e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class DatePickerDetails implements Serializable {
public enum DatePickerType {
GREGORIAN, ETHIOPIAN, COPTIC, ISLAMIC, BIKRAM_SAMBAT
GREGORIAN, ETHIOPIAN, COPTIC, ISLAMIC, BIKRAM_SAMBAT, MYANMAR
}

public enum DatePickerMode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ public static DatePickerDetails getDatePickerDetails(String appearance) {
} else if (appearance.contains("bikram-sambat")) {
datePickerType = DatePickerDetails.DatePickerType.BIKRAM_SAMBAT;
datePickerMode = DatePickerDetails.DatePickerMode.SPINNERS;
} else if (appearance.contains("myanmar")) {
datePickerType = DatePickerDetails.DatePickerType.MYANMAR;
datePickerMode = DatePickerDetails.DatePickerMode.SPINNERS;
} else if (appearance.contains("no-calendar")) {
datePickerMode = DatePickerDetails.DatePickerMode.SPINNERS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public DateTimeWidget(Context context, FormEntryPrompt prompt) {
dateWidget = new IslamicDateWidget(context, prompt);
} else if (appearance != null && appearance.contains("bikram-sambat")) {
dateWidget = new BikramSambatDateWidget(context, prompt);
} else if (appearance != null && appearance.contains("myanmar")) {
dateWidget = new MyanmarDateWidget(context, prompt);
} else {
dateWidget = new DateWidget(context, prompt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public static QuestionWidget createWidgetFromPrompt(FormEntryPrompt fep, Context
questionWidget = new IslamicDateWidget(context, fep);
} else if (appearance.contains("bikram-sambat")) {
questionWidget = new BikramSambatDateWidget(context, fep);
} else if (appearance.contains("myanmar")) {
questionWidget = new MyanmarDateWidget(context, fep);
} else {
questionWidget = new DateWidget(context, fep);
}
Expand Down

0 comments on commit 48860e6

Please sign in to comment.