From 832436e53d06ca46688c4851b311eb37dbaa0f14 Mon Sep 17 00:00:00 2001 From: Yeojong Date: Mon, 26 Jul 2021 11:30:37 -0400 Subject: [PATCH 1/6] modify HOUR_OF_DAY getHour and getHourOfDay both are using Calendar.HOUR. So when I set isAmPm is false afternoon, it always shows between 1 and 12. --- .../github/florent37/singledateandtimepicker/DateHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java index b37accb7..82fd3924 100644 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java @@ -44,7 +44,7 @@ public int getHour(Date date) { } public int getHourOfDay(Date date) { - return getCalendarOfDate(date).get(Calendar.HOUR); + return getCalendarOfDate(date).get(Calendar.HOUR_OF_DAY); } public int getHour(Date date, boolean isAmPm) { From 41df85d04f13a89fd60b1786b6ab7f04d28bc1d0 Mon Sep 17 00:00:00 2001 From: Yeojong Date: Mon, 9 Aug 2021 14:38:12 -0400 Subject: [PATCH 2/6] fix a timezone bug. When sets a timezone into DatePicker, it does not take it. Because SingleDateAndTimePicker does not refresh dateHelper objects at each WheelViews. So add 3 lines codes for update them. --- .../singledateandtimepicker/SingleDateAndTimePicker.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java index baf26241..c0cdf941 100644 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java @@ -137,6 +137,10 @@ public SingleDateAndTimePicker(Context context, AttributeSet attrs, int defStyle public void setDateHelper(DateHelper dateHelper) { this.dateHelper = dateHelper; + // update DateHelper object at each Wheel view + for (WheelPicker wheelPicker : pickers) { + wheelPicker.setDateHelper(dateHelper); + } } public void setTimeZone(TimeZone timeZone) { From ea040530e531a0a7fa13ad001a21b946920a01b5 Mon Sep 17 00:00:00 2001 From: yeojoy Date: Wed, 17 Aug 2022 17:54:23 -0400 Subject: [PATCH 3/6] on fixing a bug --- .circleci/config.yml | 0 .github/FUNDING.yml | 0 .gitignore | 0 LICENSE | 0 README.md | 0 app/.gitignore | 0 app/build.gradle | 0 app/proguard-rules.pro | 0 app/src/main/AndroidManifest.xml | 0 .../SingleDatePickerMainActivity.java | 0 ...atePickerMainActivityWithDoublePicker.java | 56 +++++++-------- .../ic_event_available_black_24dp.xml | 0 app/src/main/res/font/dinot_bold.ttf | Bin app/src/main/res/font/dinot_regular.ttf | Bin .../single_date_picker_activity_main.xml | 0 ...ate_picker_activity_main_double_picker.xml | 64 +++++++----------- app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin app/src/main/res/values-w820dp/dimens.xml | 0 app/src/main/res/values/colors.xml | 0 app/src/main/res/values/strings.xml | 0 app/src/main/res/values/styles.xml | 0 build.gradle | 0 circle.yml | 0 gradle.properties | 0 gradle/bintray-android-v1.gradle | 0 gradle/bintray-java-v1.gradle | 0 gradle/install-v1.gradle | 0 gradle/wrapper/gradle-wrapper.jar | Bin gradle/wrapper/gradle-wrapper.properties | 0 gradlew.bat | 0 media/custom_colors.png | Bin media/double.png | Bin media/double_small.png | Bin media/double_small_crop.png | Bin media/ios_double.png | Bin media/ios_double_crop.png | Bin media/ios_simple.png | Bin media/ios_simple_crop.png | Bin media/layout.png | Bin media/layout_small.png | Bin media/new_video.gif | Bin media/new_video.mp4 | Bin media/simple.png | Bin media/simple_small.png | Bin media/single_small_crop.png | Bin media/single_tiny_crop.png | Bin media/years_crop.png | Bin settings.gradle | 0 singledateandtimepicker/.gitignore | 0 singledateandtimepicker/build.gradle | 0 singledateandtimepicker/proguard-rules.pro | 0 .../src/main/AndroidManifest.xml | 0 .../singledateandtimepicker/DateHelper.java | 13 +++- .../singledateandtimepicker/LocaleHelper.java | 0 .../SingleDateAndTimePicker.java | 1 + .../dialog/BaseDialog.java | 0 .../dialog/BottomSheetHelper.java | 0 .../dialog/DoubleDateAndTimePickerDialog.java | 0 .../dialog/SingleDateAndTimePickerDialog.java | 0 .../widget/DateWithLabel.java | 0 .../widget/SingleDateAndTimeConstants.java | 0 .../widget/WheelAmPmPicker.java | 7 ++ .../widget/WheelDayOfMonthPicker.java | 0 .../widget/WheelDayPicker.java | 0 .../widget/WheelHourPicker.java | 7 +- .../widget/WheelMinutePicker.java | 0 .../widget/WheelMonthPicker.java | 0 .../widget/WheelPicker.java | 5 ++ .../widget/WheelYearPicker.java | 0 .../color/date_picker_am_pm_text_selector.xml | 0 ...ouble_date_picker_button_text_selector.xml | 0 ...e_date_picker_button_text_selector_ios.xml | 0 ...date_picker_button_background_selector.xml | 0 ..._picker_button_background_selector_ios.xml | 0 .../src/main/res/drawable/picker_divider.xml | 0 .../bottom_sheet_picker_bottom_sheet.xml | 0 .../res/layout/bottom_sheet_double_picker.xml | 0 ...ottom_sheet_double_picker_bottom_sheet.xml | 0 .../main/res/layout/bottom_sheet_picker.xml | 0 .../bottom_sheet_picker_bottom_sheet.xml | 0 .../res/layout/single_day_and_time_picker.xml | 0 .../src/main/res/values-ca/strings.xml | 0 .../src/main/res/values-cs/strings.xml | 0 .../src/main/res/values-da/strings.xml | 0 .../src/main/res/values-de/strings.xml | 0 .../src/main/res/values-es/strings.xml | 0 .../src/main/res/values-fi/strings.xml | 0 .../src/main/res/values-fr/strings.xml | 0 .../src/main/res/values-id/strings.xml | 0 .../src/main/res/values-it/strings.xml | 0 .../src/main/res/values-ko/strings.xml | 0 .../src/main/res/values-lt/strings.xml | 0 .../src/main/res/values-ms/strings.xml | 0 .../src/main/res/values-nb/strings.xml | 0 .../src/main/res/values-pt/strings.xml | 0 .../src/main/res/values-ru/strings.xml | 0 .../src/main/res/values-sv/strings.xml | 0 .../src/main/res/values-th/strings.xml | 0 .../src/main/res/values-tr/strings.xml | 0 .../src/main/res/values-uk/strings.xml | 0 .../src/main/res/values-vi/strings.xml | 0 .../src/main/res/values-zh/strings.xml | 0 .../src/main/res/values/attrs.xml | 0 .../src/main/res/values/colors.xml | 0 .../src/main/res/values/dimens.xml | 0 .../src/main/res/values/strings.xml | 0 110 files changed, 74 insertions(+), 79 deletions(-) mode change 100644 => 100755 .circleci/config.yml mode change 100644 => 100755 .github/FUNDING.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 app/.gitignore mode change 100644 => 100755 app/build.gradle mode change 100644 => 100755 app/proguard-rules.pro mode change 100644 => 100755 app/src/main/AndroidManifest.xml mode change 100644 => 100755 app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java mode change 100644 => 100755 app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java mode change 100644 => 100755 app/src/main/res/drawable/ic_event_available_black_24dp.xml mode change 100644 => 100755 app/src/main/res/font/dinot_bold.ttf mode change 100644 => 100755 app/src/main/res/font/dinot_regular.ttf mode change 100644 => 100755 app/src/main/res/layout/single_date_picker_activity_main.xml mode change 100644 => 100755 app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml mode change 100644 => 100755 app/src/main/res/mipmap-hdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-mdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xxhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/values-w820dp/dimens.xml mode change 100644 => 100755 app/src/main/res/values/colors.xml mode change 100644 => 100755 app/src/main/res/values/strings.xml mode change 100644 => 100755 app/src/main/res/values/styles.xml mode change 100644 => 100755 build.gradle mode change 100644 => 100755 circle.yml mode change 100644 => 100755 gradle.properties mode change 100644 => 100755 gradle/bintray-android-v1.gradle mode change 100644 => 100755 gradle/bintray-java-v1.gradle mode change 100644 => 100755 gradle/install-v1.gradle mode change 100644 => 100755 gradle/wrapper/gradle-wrapper.jar mode change 100644 => 100755 gradle/wrapper/gradle-wrapper.properties mode change 100644 => 100755 gradlew.bat mode change 100644 => 100755 media/custom_colors.png mode change 100644 => 100755 media/double.png mode change 100644 => 100755 media/double_small.png mode change 100644 => 100755 media/double_small_crop.png mode change 100644 => 100755 media/ios_double.png mode change 100644 => 100755 media/ios_double_crop.png mode change 100644 => 100755 media/ios_simple.png mode change 100644 => 100755 media/ios_simple_crop.png mode change 100644 => 100755 media/layout.png mode change 100644 => 100755 media/layout_small.png mode change 100644 => 100755 media/new_video.gif mode change 100644 => 100755 media/new_video.mp4 mode change 100644 => 100755 media/simple.png mode change 100644 => 100755 media/simple_small.png mode change 100644 => 100755 media/single_small_crop.png mode change 100644 => 100755 media/single_tiny_crop.png mode change 100644 => 100755 media/years_crop.png mode change 100644 => 100755 settings.gradle mode change 100644 => 100755 singledateandtimepicker/.gitignore mode change 100644 => 100755 singledateandtimepicker/build.gradle mode change 100644 => 100755 singledateandtimepicker/proguard-rules.pro mode change 100644 => 100755 singledateandtimepicker/src/main/AndroidManifest.xml mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/picker_divider.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ca/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-cs/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-da/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-de/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-es/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-fi/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-fr/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-id/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-it/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ko/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-lt/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ms/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-nb/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-pt/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ru/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-sv/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-th/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-tr/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-uk/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-vi/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-zh/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/attrs.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/colors.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/dimens.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/strings.xml diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100644 new mode 100755 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/.gitignore b/app/.gitignore old mode 100644 new mode 100755 diff --git a/app/build.gradle b/app/build.gradle old mode 100644 new mode 100755 diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro old mode 100644 new mode 100755 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java old mode 100644 new mode 100755 diff --git a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java old mode 100644 new mode 100755 index c6846449..6594d99a --- a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java +++ b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java @@ -3,7 +3,6 @@ import android.os.Bundle; import android.util.Log; import android.widget.TextView; -import android.widget.Toast; import com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker; import com.github.florent37.singledateandtimepicker.dialog.DoubleDateAndTimePickerDialog; @@ -48,6 +47,7 @@ public class SingleDatePickerMainActivityWithDoublePicker extends AppCompatActiv DoubleDateAndTimePickerDialog.Builder doubleBuilder; private static String TAG = "SingleDatePickerMainActivityWithDoublePicker"; + private long currentTime = 0L; @Override protected void onCreate(Bundle savedInstanceState) { @@ -74,23 +74,27 @@ protected void onPause() { } - - @OnClick(R.id.singleTimeText) + /* TODO Working on it */ + @OnClick(R.id.single_time_dialog_layout) public void simpleTimeClicked() { - Calendar calendar = Calendar.getInstance(); - - calendar.set(Calendar.HOUR_OF_DAY, 21); - calendar.set(Calendar.MINUTE, 50); + Date date = new Date(); + if (currentTime == 0L) { + currentTime = System.currentTimeMillis(); + } + SimpleDateFormat currentDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + System.out.println("simpleTimeClicked() " + currentDateFormat.format(currentTime)); + date.setTime(currentTime); - final Date defaultDate = calendar.getTime(); + TimeZone timeZone = TimeZone.getTimeZone("US/Arizona"); + simpleTimeFormat.setTimeZone(timeZone); singleBuilder = new SingleDateAndTimePickerDialog.Builder(this) - .setTimeZone(TimeZone.getDefault()) + .setTimeZone(timeZone) .bottomSheet() .curved() - - .defaultDate(defaultDate) + .displayAmPm(true) + .defaultDate(date) //.titleTextColor(Color.GREEN) //.backgroundColor(Color.BLACK) @@ -115,17 +119,15 @@ public void onClosed(SingleDateAndTimePicker picker) { }) .title("Simple Time") - .listener(new SingleDateAndTimePickerDialog.Listener() { - @Override - public void onDateSelected(Date date) { - singleTimeText.setText(simpleTimeFormat.format(date)); - } + .listener(date1 -> { + currentTime = date1.getTime(); + singleTimeText.setText(simpleTimeFormat.format(date1)); }); singleBuilder.display(); } - @OnClick(R.id.singleDateText) + @OnClick(R.id.single_date_dialog_layout) public void simpleDateClicked() { final Calendar calendar = Calendar.getInstance(); @@ -135,15 +137,9 @@ public void simpleDateClicked() { .setTimeZone(TimeZone.getDefault()) .bottomSheet() .curved() - - //.titleTextColor(Color.GREEN) - //.backgroundColor(Color.BLACK) - //.mainColor(Color.GREEN) - .displayHours(false) .displayMinutes(false) .displayDays(true) - .displayListener(new SingleDateAndTimePickerDialog.DisplayListener() { @Override public void onDisplayed(SingleDateAndTimePicker picker) { @@ -155,18 +151,12 @@ public void onClosed(SingleDateAndTimePicker picker) { Log.d(TAG, "Dialog closed"); } }) - .title("") - .listener(new SingleDateAndTimePickerDialog.Listener() { - @Override - public void onDateSelected(Date date) { - singleDateText.setText(simpleDateOnlyFormat.format(date)); - } - }); + .listener(date -> singleDateText.setText(simpleDateOnlyFormat.format(date))); singleBuilder.display(); } - @OnClick(R.id.singleLayout) + @OnClick(R.id.single_dialog_layout) public void simpleClicked() { final Calendar calendar = Calendar.getInstance(); @@ -225,7 +215,7 @@ public void onDateSelected(Date date) { singleBuilder.display(); } - @OnClick(R.id.doubleLayout) + @OnClick(R.id.double_dialog_layout) public void doubleClicked() { final Date now = new Date(); @@ -274,7 +264,7 @@ public void onDateSelected(List dates) { doubleBuilder.display(); } - @OnClick(R.id.singleDateLocaleLayout) + @OnClick(R.id.single_date_dialog_german_layout) public void singleDateLocaleClicked() { singleBuilder = new SingleDateAndTimePickerDialog.Builder(this) .customLocale(Locale.GERMAN) diff --git a/app/src/main/res/drawable/ic_event_available_black_24dp.xml b/app/src/main/res/drawable/ic_event_available_black_24dp.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/font/dinot_bold.ttf b/app/src/main/res/font/dinot_bold.ttf old mode 100644 new mode 100755 diff --git a/app/src/main/res/font/dinot_regular.ttf b/app/src/main/res/font/dinot_regular.ttf old mode 100644 new mode 100755 diff --git a/app/src/main/res/layout/single_date_picker_activity_main.xml b/app/src/main/res/layout/single_date_picker_activity_main.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml b/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml old mode 100644 new mode 100755 index 17cb48cd..e00bb167 --- a/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml +++ b/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml @@ -3,8 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - > + android:orientation="vertical"> + app:titleTextColor="@android:color/white" /> + android:orientation="vertical"> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml old mode 100644 new mode 100755 diff --git a/build.gradle b/build.gradle old mode 100644 new mode 100755 diff --git a/circle.yml b/circle.yml old mode 100644 new mode 100755 diff --git a/gradle.properties b/gradle.properties old mode 100644 new mode 100755 diff --git a/gradle/bintray-android-v1.gradle b/gradle/bintray-android-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/bintray-java-v1.gradle b/gradle/bintray-java-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/install-v1.gradle b/gradle/install-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties old mode 100644 new mode 100755 diff --git a/gradlew.bat b/gradlew.bat old mode 100644 new mode 100755 diff --git a/media/custom_colors.png b/media/custom_colors.png old mode 100644 new mode 100755 diff --git a/media/double.png b/media/double.png old mode 100644 new mode 100755 diff --git a/media/double_small.png b/media/double_small.png old mode 100644 new mode 100755 diff --git a/media/double_small_crop.png b/media/double_small_crop.png old mode 100644 new mode 100755 diff --git a/media/ios_double.png b/media/ios_double.png old mode 100644 new mode 100755 diff --git a/media/ios_double_crop.png b/media/ios_double_crop.png old mode 100644 new mode 100755 diff --git a/media/ios_simple.png b/media/ios_simple.png old mode 100644 new mode 100755 diff --git a/media/ios_simple_crop.png b/media/ios_simple_crop.png old mode 100644 new mode 100755 diff --git a/media/layout.png b/media/layout.png old mode 100644 new mode 100755 diff --git a/media/layout_small.png b/media/layout_small.png old mode 100644 new mode 100755 diff --git a/media/new_video.gif b/media/new_video.gif old mode 100644 new mode 100755 diff --git a/media/new_video.mp4 b/media/new_video.mp4 old mode 100644 new mode 100755 diff --git a/media/simple.png b/media/simple.png old mode 100644 new mode 100755 diff --git a/media/simple_small.png b/media/simple_small.png old mode 100644 new mode 100755 diff --git a/media/single_small_crop.png b/media/single_small_crop.png old mode 100644 new mode 100755 diff --git a/media/single_tiny_crop.png b/media/single_tiny_crop.png old mode 100644 new mode 100755 diff --git a/media/years_crop.png b/media/years_crop.png old mode 100644 new mode 100755 diff --git a/settings.gradle b/settings.gradle old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/.gitignore b/singledateandtimepicker/.gitignore old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/build.gradle b/singledateandtimepicker/build.gradle old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/proguard-rules.pro b/singledateandtimepicker/proguard-rules.pro old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/AndroidManifest.xml b/singledateandtimepicker/src/main/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java old mode 100644 new mode 100755 index 82fd3924..4124a0e6 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java @@ -2,8 +2,10 @@ import androidx.annotation.NonNull; +import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; +import java.util.Locale; import java.util.TimeZone; public class DateHelper { @@ -20,22 +22,27 @@ public DateHelper(TimeZone timeZone) { public void setTimeZone(TimeZone timeZoneValue) { timeZone = timeZoneValue; + System.out.println("DateHelper setTimeZone(): " + timeZoneValue.getID()); } @NonNull public TimeZone getTimeZone() { if(this.timeZone == null) { - return TimeZone.getDefault(); - } else { - return timeZone; + timeZone = TimeZone.getDefault(); } + System.out.println("DateHelper getTimeZone(): " + timeZone.getID()); + return timeZone; } public Calendar getCalendarOfDate(Date date) { + final String formatter = "yyyy-MM-dd HH:mm:ss"; + final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatter, Locale.getDefault()); + System.out.println("DateHelper getCalendarOfDate(): Original " + simpleDateFormat.format(date)); final Calendar calendar = Calendar.getInstance(getTimeZone()); calendar.setTime(date); calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0); + System.out.println("DateHelper getCalendarOfDate(): " + simpleDateFormat.format(calendar.getTime())); return calendar; } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java old mode 100644 new mode 100755 index c0cdf941..b79611cd --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java @@ -229,6 +229,7 @@ public void onFinishedLoop(WheelHourPicker picker) { .setHourChangedListener(new WheelHourPicker.OnHourChangedListener() { @Override public void onHourChanged(WheelHourPicker picker, int hour) { + System.out.println("SingleDateAndTimePicker onHourChanged(): hour -> " + hour); updateListener(); checkMinMaxDate(picker); } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java old mode 100644 new mode 100755 index e33d31fb..9607d32f --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java @@ -5,10 +5,12 @@ import com.github.florent37.singledateandtimepicker.R; +import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Locale; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -53,10 +55,15 @@ protected List generateAdapterValues(boolean showOnlyFutureDates){ @Override public int findIndexOfDate(@NonNull Date date) { + final String formatter = "yyyy-MM-dd HH:mm:ss"; + final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatter, Locale.getDefault()); + System.out.println("WheelAmPmPicker findIndexOfDate(): timeZone " + dateHelper.getTimeZone().getID()); + System.out.println("WheelAmPmPicker findIndexOfDate(): Date " + simpleDateFormat.format(date)); Calendar calendar = Calendar.getInstance(); calendar.setTimeZone(dateHelper.getTimeZone()); calendar.setTime(date); final int hours = calendar.get(Calendar.HOUR_OF_DAY); + System.out.println("WheelAmPmPicker findIndexOfDate(): " + hours); if (hours >= SingleDateAndTimeConstants.MAX_HOUR_AM_PM) { return 1; } else { diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java old mode 100644 new mode 100755 index cc5380c9..8b09f873 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java @@ -2,6 +2,7 @@ import android.content.Context; import android.util.AttributeSet; +import android.util.Log; import java.util.ArrayList; import java.util.Calendar; @@ -43,7 +44,9 @@ protected void init() { @Override protected String initDefault() { - return String.valueOf(dateHelper.getHour(dateHelper.today(), isAmPm)); + int hour = dateHelper.getHour(dateHelper.today(), isAmPm); + Log.d("WheelHourPicker", "initDefault() default hour: " + hour); + return String.valueOf(hour); } @Override @@ -95,7 +98,7 @@ public void setDefault(String defaultValue) { if (isAmPm && hour >= MAX_HOUR_AM_PM) { hour -= MAX_HOUR_AM_PM; } - + Log.d("WheelHourPicker", "setDefault() default hour: " + hour); super.setDefault(getFormattedValue(hour)); } catch (Exception e){ e.printStackTrace(); diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java old mode 100644 new mode 100755 index 10f96f96..c22202f3 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java @@ -17,6 +17,7 @@ import android.os.Handler; import android.text.TextUtils; import android.util.AttributeSet; +import android.util.Log; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; @@ -262,8 +263,10 @@ public void setDefault(V defaultValue) { public void setDefaultDate(Date date) { if (adapter != null && adapter.getItemCount() > 0) { final int indexOfDate = findIndexOfDate(date); + Log.d("WheelPicker", "setDefaultDate() indexOfDate: " + indexOfDate); if (indexOfDate >= 0) { this.defaultValue = adapter.getData().get(indexOfDate); + Log.d("WheelPicker", "setDefaultDate() defaultValue: " + defaultValue); setSelectedItemPosition(indexOfDate); } } @@ -964,6 +967,7 @@ public void setTypeface(Typeface tf) { */ public int findIndexOfDate(@NonNull Date date) { String formatItem = getFormattedValue(date); + System.out.println("WheelPicker findIndexOfDate(): " + formatItem); if (this instanceof WheelDayOfMonthPicker) { Calendar calendar = Calendar.getInstance(); @@ -1040,6 +1044,7 @@ public Locale getCurrentLocale() { } public void setDateHelper(DateHelper dateHelper) { + System.out.println("WheelPicker setDateHelper(): " + dateHelper.getTimeZone().getID()); this.dateHelper = dateHelper; } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml b/singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml b/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml b/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml b/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml b/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/picker_divider.xml b/singledateandtimepicker/src/main/res/drawable/picker_divider.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml b/singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ca/strings.xml b/singledateandtimepicker/src/main/res/values-ca/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-cs/strings.xml b/singledateandtimepicker/src/main/res/values-cs/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-da/strings.xml b/singledateandtimepicker/src/main/res/values-da/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-de/strings.xml b/singledateandtimepicker/src/main/res/values-de/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-es/strings.xml b/singledateandtimepicker/src/main/res/values-es/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-fi/strings.xml b/singledateandtimepicker/src/main/res/values-fi/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-fr/strings.xml b/singledateandtimepicker/src/main/res/values-fr/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-id/strings.xml b/singledateandtimepicker/src/main/res/values-id/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-it/strings.xml b/singledateandtimepicker/src/main/res/values-it/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ko/strings.xml b/singledateandtimepicker/src/main/res/values-ko/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-lt/strings.xml b/singledateandtimepicker/src/main/res/values-lt/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ms/strings.xml b/singledateandtimepicker/src/main/res/values-ms/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-nb/strings.xml b/singledateandtimepicker/src/main/res/values-nb/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-pt/strings.xml b/singledateandtimepicker/src/main/res/values-pt/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ru/strings.xml b/singledateandtimepicker/src/main/res/values-ru/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-sv/strings.xml b/singledateandtimepicker/src/main/res/values-sv/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-th/strings.xml b/singledateandtimepicker/src/main/res/values-th/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-tr/strings.xml b/singledateandtimepicker/src/main/res/values-tr/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-uk/strings.xml b/singledateandtimepicker/src/main/res/values-uk/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-vi/strings.xml b/singledateandtimepicker/src/main/res/values-vi/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-zh/strings.xml b/singledateandtimepicker/src/main/res/values-zh/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/attrs.xml b/singledateandtimepicker/src/main/res/values/attrs.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/colors.xml b/singledateandtimepicker/src/main/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/dimens.xml b/singledateandtimepicker/src/main/res/values/dimens.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/strings.xml b/singledateandtimepicker/src/main/res/values/strings.xml old mode 100644 new mode 100755 From e678369f3e301c0edf801498e8761316be5f2edc Mon Sep 17 00:00:00 2001 From: yeojong Date: Thu, 18 Aug 2022 14:19:55 -0400 Subject: [PATCH 4/6] fix not updating hour With isAmPm is true, I open time picker. Before noon, it is ok. However afternoon, hour is fixed with 11. After select an hour then open it, this case, the hour is fixed. I just update default vaule when call setIsAmPm in WheelHourPicker. I think at 13:00, and isAmPm true, defaultValue should be 1. --- .../widget/WheelAmPmPicker.java | 7 ------- .../widget/WheelHourPicker.java | 11 ++++------- .../singledateandtimepicker/widget/WheelPicker.java | 11 +---------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java index 9607d32f..e33d31fb 100755 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java @@ -5,12 +5,10 @@ import com.github.florent37.singledateandtimepicker.R; -import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.List; -import java.util.Locale; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -55,15 +53,10 @@ protected List generateAdapterValues(boolean showOnlyFutureDates){ @Override public int findIndexOfDate(@NonNull Date date) { - final String formatter = "yyyy-MM-dd HH:mm:ss"; - final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatter, Locale.getDefault()); - System.out.println("WheelAmPmPicker findIndexOfDate(): timeZone " + dateHelper.getTimeZone().getID()); - System.out.println("WheelAmPmPicker findIndexOfDate(): Date " + simpleDateFormat.format(date)); Calendar calendar = Calendar.getInstance(); calendar.setTimeZone(dateHelper.getTimeZone()); calendar.setTime(date); final int hours = calendar.get(Calendar.HOUR_OF_DAY); - System.out.println("WheelAmPmPicker findIndexOfDate(): " + hours); if (hours >= SingleDateAndTimeConstants.MAX_HOUR_AM_PM) { return 1; } else { diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java index 8b09f873..d5855ceb 100755 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java @@ -2,7 +2,6 @@ import android.content.Context; import android.util.AttributeSet; -import android.util.Log; import java.util.ArrayList; import java.util.Calendar; @@ -44,9 +43,7 @@ protected void init() { @Override protected String initDefault() { - int hour = dateHelper.getHour(dateHelper.today(), isAmPm); - Log.d("WheelHourPicker", "initDefault() default hour: " + hour); - return String.valueOf(hour); + return String.valueOf(dateHelper.getHour(dateHelper.today(), isAmPm)); } @Override @@ -98,7 +95,6 @@ public void setDefault(String defaultValue) { if (isAmPm && hour >= MAX_HOUR_AM_PM) { hour -= MAX_HOUR_AM_PM; } - Log.d("WheelHourPicker", "setDefault() default hour: " + hour); super.setDefault(getFormattedValue(hour)); } catch (Exception e){ e.printStackTrace(); @@ -109,6 +105,8 @@ public void setIsAmPm(boolean isAmPm) { this.isAmPm = isAmPm; if (isAmPm) { setMaxHour(MAX_HOUR_AM_PM); + // To fix NOT updating afternoon hour, by yeojong + setDefault(defaultValue); } else { setMaxHour(MAX_HOUR_DEFAULT); } @@ -137,7 +135,7 @@ public void setStepSizeHours(int hoursStep) { } private int convertItemToHour(Object item) { - Integer hour = Integer.valueOf(String.valueOf(item)); + int hour = Integer.parseInt(String.valueOf(item)); if (!isAmPm) { return hour; } @@ -145,7 +143,6 @@ private int convertItemToHour(Object item) { if (hour == 12) { hour = 0; } - return hour; } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java index c22202f3..4b3f41d7 100755 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java @@ -17,7 +17,6 @@ import android.os.Handler; import android.text.TextUtils; import android.util.AttributeSet; -import android.util.Log; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; @@ -263,10 +262,8 @@ public void setDefault(V defaultValue) { public void setDefaultDate(Date date) { if (adapter != null && adapter.getItemCount() > 0) { final int indexOfDate = findIndexOfDate(date); - Log.d("WheelPicker", "setDefaultDate() indexOfDate: " + indexOfDate); if (indexOfDate >= 0) { this.defaultValue = adapter.getData().get(indexOfDate); - Log.d("WheelPicker", "setDefaultDate() defaultValue: " + defaultValue); setSelectedItemPosition(indexOfDate); } } @@ -967,7 +964,6 @@ public void setTypeface(Typeface tf) { */ public int findIndexOfDate(@NonNull Date date) { String formatItem = getFormattedValue(date); - System.out.println("WheelPicker findIndexOfDate(): " + formatItem); if (this instanceof WheelDayOfMonthPicker) { Calendar calendar = Calendar.getInstance(); @@ -1012,10 +1008,6 @@ public int findIndexOfDate(@NonNull Date date) { if (formatItemInt != Integer.MIN_VALUE) { // displayed values are Integers int objectInt = Integer.parseInt(object); - if (this instanceof WheelHourPicker && ((WheelHourPicker) this).isAmPm) { - // In case of hours and AM/PM mode, apply modulo 12 - objectInt = objectInt % 12; - } if (objectInt <= formatItemInt) { index = i; } @@ -1044,7 +1036,6 @@ public Locale getCurrentLocale() { } public void setDateHelper(DateHelper dateHelper) { - System.out.println("WheelPicker setDateHelper(): " + dateHelper.getTimeZone().getID()); this.dateHelper = dateHelper; } @@ -1179,4 +1170,4 @@ public int getItemPosition(V value) { return position; } } -} +} \ No newline at end of file From a94281948e789829bb07e12129a592b60e6f3ef3 Mon Sep 17 00:00:00 2001 From: yeojong Date: Thu, 18 Aug 2022 14:20:44 -0400 Subject: [PATCH 5/6] update sample application --- app/build.gradle | 4 ++-- app/src/main/AndroidManifest.xml | 3 ++- .../SingleDatePickerMainActivityWithDoublePicker.java | 2 +- build.gradle | 6 +++--- singledateandtimepicker/build.gradle | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index afec38dd..aa7b99a4 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "androidx.appcompat:appcompat:1.1.0" - implementation 'com.google.android.material:material:1.1.0' + implementation "androidx.appcompat:appcompat:1.5.0" + implementation 'com.google.android.material:material:1.6.1' implementation 'com.jakewharton:butterknife:10.2.1' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1' implementation project(':singledateandtimepicker') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4b6b4a8e..43e44a0d 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -8,7 +8,8 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java index 6594d99a..19ae07d4 100755 --- a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java +++ b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java @@ -86,7 +86,7 @@ public void simpleTimeClicked() { System.out.println("simpleTimeClicked() " + currentDateFormat.format(currentTime)); date.setTime(currentTime); - TimeZone timeZone = TimeZone.getTimeZone("US/Arizona"); + TimeZone timeZone = TimeZone.getTimeZone(""); simpleTimeFormat.setTimeZone(timeZone); singleBuilder = new SingleDateAndTimePickerDialog.Builder(this) diff --git a/build.gradle b/build.gradle index ba2ea3fd..5645ec71 100755 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.2' + classpath 'com.android.tools.build:gradle:3.6.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' // NOTE: Do not place your application dependencies here; they belong @@ -23,8 +23,8 @@ allprojects { } ext { - sdk = 28 - minSdk = 14 + sdk = 32 + minSdk = 23 github = 'https://github.com/florent37/SingleDateAndTimePicker' diff --git a/singledateandtimepicker/build.gradle b/singledateandtimepicker/build.gradle index a19bbffe..ff596f22 100755 --- a/singledateandtimepicker/build.gradle +++ b/singledateandtimepicker/build.gradle @@ -15,7 +15,7 @@ android { } dependencies { - implementation "androidx.appcompat:appcompat:1.1.0" + implementation "androidx.appcompat:appcompat:1.5.0" } ext { From 28f2978d0ec7162f4d2f25827de0aaa78693a265 Mon Sep 17 00:00:00 2001 From: yeojoy Date: Wed, 17 Aug 2022 17:54:23 -0400 Subject: [PATCH 6/6] version 1.2-3, fix not updating hour With isAmPm is true, I open time picker. Before noon, it is ok. However afternoon, hour is fixed with 11. After select an hour then open it, this case, the hour is fixed. I just update default vaule when call setIsAmPm in WheelHourPicker. I think at 13:00, and isAmPm true, defaultValue should be 1. --- .circleci/config.yml | 0 .github/FUNDING.yml | 0 .gitignore | 0 LICENSE | 0 README.md | 0 app/.gitignore | 0 app/build.gradle | 0 app/proguard-rules.pro | 0 app/src/main/AndroidManifest.xml | 0 .../SingleDatePickerMainActivity.java | 0 ...atePickerMainActivityWithDoublePicker.java | 56 +++++++-------- .../ic_event_available_black_24dp.xml | 0 app/src/main/res/font/dinot_bold.ttf | Bin app/src/main/res/font/dinot_regular.ttf | Bin .../single_date_picker_activity_main.xml | 0 ...ate_picker_activity_main_double_picker.xml | 64 +++++++----------- app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin app/src/main/res/values-w820dp/dimens.xml | 0 app/src/main/res/values/colors.xml | 0 app/src/main/res/values/strings.xml | 0 app/src/main/res/values/styles.xml | 0 build.gradle | 0 circle.yml | 0 gradle.properties | 0 gradle/bintray-android-v1.gradle | 0 gradle/bintray-java-v1.gradle | 0 gradle/install-v1.gradle | 0 gradle/wrapper/gradle-wrapper.jar | Bin gradle/wrapper/gradle-wrapper.properties | 0 gradlew.bat | 0 media/custom_colors.png | Bin media/double.png | Bin media/double_small.png | Bin media/double_small_crop.png | Bin media/ios_double.png | Bin media/ios_double_crop.png | Bin media/ios_simple.png | Bin media/ios_simple_crop.png | Bin media/layout.png | Bin media/layout_small.png | Bin media/new_video.gif | Bin media/new_video.mp4 | Bin media/simple.png | Bin media/simple_small.png | Bin media/single_small_crop.png | Bin media/single_tiny_crop.png | Bin media/years_crop.png | Bin settings.gradle | 0 singledateandtimepicker/.gitignore | 0 singledateandtimepicker/build.gradle | 4 +- singledateandtimepicker/proguard-rules.pro | 0 .../src/main/AndroidManifest.xml | 0 .../singledateandtimepicker/DateHelper.java | 13 +++- .../singledateandtimepicker/LocaleHelper.java | 0 .../SingleDateAndTimePicker.java | 1 + .../dialog/BaseDialog.java | 0 .../dialog/BottomSheetHelper.java | 0 .../dialog/DoubleDateAndTimePickerDialog.java | 0 .../dialog/SingleDateAndTimePickerDialog.java | 0 .../widget/DateWithLabel.java | 0 .../widget/SingleDateAndTimeConstants.java | 0 .../widget/WheelAmPmPicker.java | 0 .../widget/WheelDayOfMonthPicker.java | 0 .../widget/WheelDayPicker.java | 0 .../widget/WheelHourPicker.java | 6 +- .../widget/WheelMinutePicker.java | 0 .../widget/WheelMonthPicker.java | 0 .../widget/WheelPicker.java | 6 +- .../widget/WheelYearPicker.java | 0 .../color/date_picker_am_pm_text_selector.xml | 0 ...ouble_date_picker_button_text_selector.xml | 0 ...e_date_picker_button_text_selector_ios.xml | 0 ...date_picker_button_background_selector.xml | 0 ..._picker_button_background_selector_ios.xml | 0 .../src/main/res/drawable/picker_divider.xml | 0 .../bottom_sheet_picker_bottom_sheet.xml | 0 .../res/layout/bottom_sheet_double_picker.xml | 0 ...ottom_sheet_double_picker_bottom_sheet.xml | 0 .../main/res/layout/bottom_sheet_picker.xml | 0 .../bottom_sheet_picker_bottom_sheet.xml | 0 .../res/layout/single_day_and_time_picker.xml | 0 .../src/main/res/values-ca/strings.xml | 0 .../src/main/res/values-cs/strings.xml | 0 .../src/main/res/values-da/strings.xml | 0 .../src/main/res/values-de/strings.xml | 0 .../src/main/res/values-es/strings.xml | 0 .../src/main/res/values-fi/strings.xml | 0 .../src/main/res/values-fr/strings.xml | 0 .../src/main/res/values-id/strings.xml | 0 .../src/main/res/values-it/strings.xml | 0 .../src/main/res/values-ko/strings.xml | 0 .../src/main/res/values-lt/strings.xml | 0 .../src/main/res/values-ms/strings.xml | 0 .../src/main/res/values-nb/strings.xml | 0 .../src/main/res/values-pt/strings.xml | 0 .../src/main/res/values-ru/strings.xml | 0 .../src/main/res/values-sv/strings.xml | 0 .../src/main/res/values-th/strings.xml | 0 .../src/main/res/values-tr/strings.xml | 0 .../src/main/res/values-uk/strings.xml | 0 .../src/main/res/values-vi/strings.xml | 0 .../src/main/res/values-zh/strings.xml | 0 .../src/main/res/values/attrs.xml | 0 .../src/main/res/values/colors.xml | 0 .../src/main/res/values/dimens.xml | 0 .../src/main/res/values/strings.xml | 0 110 files changed, 63 insertions(+), 87 deletions(-) mode change 100644 => 100755 .circleci/config.yml mode change 100644 => 100755 .github/FUNDING.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 app/.gitignore mode change 100644 => 100755 app/build.gradle mode change 100644 => 100755 app/proguard-rules.pro mode change 100644 => 100755 app/src/main/AndroidManifest.xml mode change 100644 => 100755 app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java mode change 100644 => 100755 app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java mode change 100644 => 100755 app/src/main/res/drawable/ic_event_available_black_24dp.xml mode change 100644 => 100755 app/src/main/res/font/dinot_bold.ttf mode change 100644 => 100755 app/src/main/res/font/dinot_regular.ttf mode change 100644 => 100755 app/src/main/res/layout/single_date_picker_activity_main.xml mode change 100644 => 100755 app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml mode change 100644 => 100755 app/src/main/res/mipmap-hdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-mdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xxhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png mode change 100644 => 100755 app/src/main/res/values-w820dp/dimens.xml mode change 100644 => 100755 app/src/main/res/values/colors.xml mode change 100644 => 100755 app/src/main/res/values/strings.xml mode change 100644 => 100755 app/src/main/res/values/styles.xml mode change 100644 => 100755 build.gradle mode change 100644 => 100755 circle.yml mode change 100644 => 100755 gradle.properties mode change 100644 => 100755 gradle/bintray-android-v1.gradle mode change 100644 => 100755 gradle/bintray-java-v1.gradle mode change 100644 => 100755 gradle/install-v1.gradle mode change 100644 => 100755 gradle/wrapper/gradle-wrapper.jar mode change 100644 => 100755 gradle/wrapper/gradle-wrapper.properties mode change 100644 => 100755 gradlew.bat mode change 100644 => 100755 media/custom_colors.png mode change 100644 => 100755 media/double.png mode change 100644 => 100755 media/double_small.png mode change 100644 => 100755 media/double_small_crop.png mode change 100644 => 100755 media/ios_double.png mode change 100644 => 100755 media/ios_double_crop.png mode change 100644 => 100755 media/ios_simple.png mode change 100644 => 100755 media/ios_simple_crop.png mode change 100644 => 100755 media/layout.png mode change 100644 => 100755 media/layout_small.png mode change 100644 => 100755 media/new_video.gif mode change 100644 => 100755 media/new_video.mp4 mode change 100644 => 100755 media/simple.png mode change 100644 => 100755 media/simple_small.png mode change 100644 => 100755 media/single_small_crop.png mode change 100644 => 100755 media/single_tiny_crop.png mode change 100644 => 100755 media/years_crop.png mode change 100644 => 100755 settings.gradle mode change 100644 => 100755 singledateandtimepicker/.gitignore mode change 100644 => 100755 singledateandtimepicker/build.gradle mode change 100644 => 100755 singledateandtimepicker/proguard-rules.pro mode change 100644 => 100755 singledateandtimepicker/src/main/AndroidManifest.xml mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/drawable/picker_divider.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ca/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-cs/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-da/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-de/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-es/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-fi/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-fr/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-id/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-it/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ko/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-lt/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ms/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-nb/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-pt/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-ru/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-sv/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-th/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-tr/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-uk/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-vi/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values-zh/strings.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/attrs.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/colors.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/dimens.xml mode change 100644 => 100755 singledateandtimepicker/src/main/res/values/strings.xml diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100644 new mode 100755 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/.gitignore b/app/.gitignore old mode 100644 new mode 100755 diff --git a/app/build.gradle b/app/build.gradle old mode 100644 new mode 100755 diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro old mode 100644 new mode 100755 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivity.java old mode 100644 new mode 100755 diff --git a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java old mode 100644 new mode 100755 index c6846449..6594d99a --- a/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java +++ b/app/src/main/java/com/github/florent37/sample/singledateandtimepicker/SingleDatePickerMainActivityWithDoublePicker.java @@ -3,7 +3,6 @@ import android.os.Bundle; import android.util.Log; import android.widget.TextView; -import android.widget.Toast; import com.github.florent37.singledateandtimepicker.SingleDateAndTimePicker; import com.github.florent37.singledateandtimepicker.dialog.DoubleDateAndTimePickerDialog; @@ -48,6 +47,7 @@ public class SingleDatePickerMainActivityWithDoublePicker extends AppCompatActiv DoubleDateAndTimePickerDialog.Builder doubleBuilder; private static String TAG = "SingleDatePickerMainActivityWithDoublePicker"; + private long currentTime = 0L; @Override protected void onCreate(Bundle savedInstanceState) { @@ -74,23 +74,27 @@ protected void onPause() { } - - @OnClick(R.id.singleTimeText) + /* TODO Working on it */ + @OnClick(R.id.single_time_dialog_layout) public void simpleTimeClicked() { - Calendar calendar = Calendar.getInstance(); - - calendar.set(Calendar.HOUR_OF_DAY, 21); - calendar.set(Calendar.MINUTE, 50); + Date date = new Date(); + if (currentTime == 0L) { + currentTime = System.currentTimeMillis(); + } + SimpleDateFormat currentDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + System.out.println("simpleTimeClicked() " + currentDateFormat.format(currentTime)); + date.setTime(currentTime); - final Date defaultDate = calendar.getTime(); + TimeZone timeZone = TimeZone.getTimeZone("US/Arizona"); + simpleTimeFormat.setTimeZone(timeZone); singleBuilder = new SingleDateAndTimePickerDialog.Builder(this) - .setTimeZone(TimeZone.getDefault()) + .setTimeZone(timeZone) .bottomSheet() .curved() - - .defaultDate(defaultDate) + .displayAmPm(true) + .defaultDate(date) //.titleTextColor(Color.GREEN) //.backgroundColor(Color.BLACK) @@ -115,17 +119,15 @@ public void onClosed(SingleDateAndTimePicker picker) { }) .title("Simple Time") - .listener(new SingleDateAndTimePickerDialog.Listener() { - @Override - public void onDateSelected(Date date) { - singleTimeText.setText(simpleTimeFormat.format(date)); - } + .listener(date1 -> { + currentTime = date1.getTime(); + singleTimeText.setText(simpleTimeFormat.format(date1)); }); singleBuilder.display(); } - @OnClick(R.id.singleDateText) + @OnClick(R.id.single_date_dialog_layout) public void simpleDateClicked() { final Calendar calendar = Calendar.getInstance(); @@ -135,15 +137,9 @@ public void simpleDateClicked() { .setTimeZone(TimeZone.getDefault()) .bottomSheet() .curved() - - //.titleTextColor(Color.GREEN) - //.backgroundColor(Color.BLACK) - //.mainColor(Color.GREEN) - .displayHours(false) .displayMinutes(false) .displayDays(true) - .displayListener(new SingleDateAndTimePickerDialog.DisplayListener() { @Override public void onDisplayed(SingleDateAndTimePicker picker) { @@ -155,18 +151,12 @@ public void onClosed(SingleDateAndTimePicker picker) { Log.d(TAG, "Dialog closed"); } }) - .title("") - .listener(new SingleDateAndTimePickerDialog.Listener() { - @Override - public void onDateSelected(Date date) { - singleDateText.setText(simpleDateOnlyFormat.format(date)); - } - }); + .listener(date -> singleDateText.setText(simpleDateOnlyFormat.format(date))); singleBuilder.display(); } - @OnClick(R.id.singleLayout) + @OnClick(R.id.single_dialog_layout) public void simpleClicked() { final Calendar calendar = Calendar.getInstance(); @@ -225,7 +215,7 @@ public void onDateSelected(Date date) { singleBuilder.display(); } - @OnClick(R.id.doubleLayout) + @OnClick(R.id.double_dialog_layout) public void doubleClicked() { final Date now = new Date(); @@ -274,7 +264,7 @@ public void onDateSelected(List dates) { doubleBuilder.display(); } - @OnClick(R.id.singleDateLocaleLayout) + @OnClick(R.id.single_date_dialog_german_layout) public void singleDateLocaleClicked() { singleBuilder = new SingleDateAndTimePickerDialog.Builder(this) .customLocale(Locale.GERMAN) diff --git a/app/src/main/res/drawable/ic_event_available_black_24dp.xml b/app/src/main/res/drawable/ic_event_available_black_24dp.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/font/dinot_bold.ttf b/app/src/main/res/font/dinot_bold.ttf old mode 100644 new mode 100755 diff --git a/app/src/main/res/font/dinot_regular.ttf b/app/src/main/res/font/dinot_regular.ttf old mode 100644 new mode 100755 diff --git a/app/src/main/res/layout/single_date_picker_activity_main.xml b/app/src/main/res/layout/single_date_picker_activity_main.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml b/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml old mode 100644 new mode 100755 index 17cb48cd..e00bb167 --- a/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml +++ b/app/src/main/res/layout/single_date_picker_activity_main_double_picker.xml @@ -3,8 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - > + android:orientation="vertical"> + app:titleTextColor="@android:color/white" /> + android:orientation="vertical"> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_event_available_black_24dp" /> + android:textSize="15sp" /> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml old mode 100644 new mode 100755 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml old mode 100644 new mode 100755 diff --git a/build.gradle b/build.gradle old mode 100644 new mode 100755 diff --git a/circle.yml b/circle.yml old mode 100644 new mode 100755 diff --git a/gradle.properties b/gradle.properties old mode 100644 new mode 100755 diff --git a/gradle/bintray-android-v1.gradle b/gradle/bintray-android-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/bintray-java-v1.gradle b/gradle/bintray-java-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/install-v1.gradle b/gradle/install-v1.gradle old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties old mode 100644 new mode 100755 diff --git a/gradlew.bat b/gradlew.bat old mode 100644 new mode 100755 diff --git a/media/custom_colors.png b/media/custom_colors.png old mode 100644 new mode 100755 diff --git a/media/double.png b/media/double.png old mode 100644 new mode 100755 diff --git a/media/double_small.png b/media/double_small.png old mode 100644 new mode 100755 diff --git a/media/double_small_crop.png b/media/double_small_crop.png old mode 100644 new mode 100755 diff --git a/media/ios_double.png b/media/ios_double.png old mode 100644 new mode 100755 diff --git a/media/ios_double_crop.png b/media/ios_double_crop.png old mode 100644 new mode 100755 diff --git a/media/ios_simple.png b/media/ios_simple.png old mode 100644 new mode 100755 diff --git a/media/ios_simple_crop.png b/media/ios_simple_crop.png old mode 100644 new mode 100755 diff --git a/media/layout.png b/media/layout.png old mode 100644 new mode 100755 diff --git a/media/layout_small.png b/media/layout_small.png old mode 100644 new mode 100755 diff --git a/media/new_video.gif b/media/new_video.gif old mode 100644 new mode 100755 diff --git a/media/new_video.mp4 b/media/new_video.mp4 old mode 100644 new mode 100755 diff --git a/media/simple.png b/media/simple.png old mode 100644 new mode 100755 diff --git a/media/simple_small.png b/media/simple_small.png old mode 100644 new mode 100755 diff --git a/media/single_small_crop.png b/media/single_small_crop.png old mode 100644 new mode 100755 diff --git a/media/single_tiny_crop.png b/media/single_tiny_crop.png old mode 100644 new mode 100755 diff --git a/media/years_crop.png b/media/years_crop.png old mode 100644 new mode 100755 diff --git a/settings.gradle b/settings.gradle old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/.gitignore b/singledateandtimepicker/.gitignore old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/build.gradle b/singledateandtimepicker/build.gradle old mode 100644 new mode 100755 index a19bbffe..b9a9489b --- a/singledateandtimepicker/build.gradle +++ b/singledateandtimepicker/build.gradle @@ -6,8 +6,8 @@ android { defaultConfig { minSdkVersion project.minSdk targetSdkVersion project.sdk - versionCode 2 - versionName "1.1" + versionCode 3 + versionName "1.2" } lintOptions { abortOnError false diff --git a/singledateandtimepicker/proguard-rules.pro b/singledateandtimepicker/proguard-rules.pro old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/AndroidManifest.xml b/singledateandtimepicker/src/main/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java old mode 100644 new mode 100755 index 82fd3924..4124a0e6 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/DateHelper.java @@ -2,8 +2,10 @@ import androidx.annotation.NonNull; +import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; +import java.util.Locale; import java.util.TimeZone; public class DateHelper { @@ -20,22 +22,27 @@ public DateHelper(TimeZone timeZone) { public void setTimeZone(TimeZone timeZoneValue) { timeZone = timeZoneValue; + System.out.println("DateHelper setTimeZone(): " + timeZoneValue.getID()); } @NonNull public TimeZone getTimeZone() { if(this.timeZone == null) { - return TimeZone.getDefault(); - } else { - return timeZone; + timeZone = TimeZone.getDefault(); } + System.out.println("DateHelper getTimeZone(): " + timeZone.getID()); + return timeZone; } public Calendar getCalendarOfDate(Date date) { + final String formatter = "yyyy-MM-dd HH:mm:ss"; + final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatter, Locale.getDefault()); + System.out.println("DateHelper getCalendarOfDate(): Original " + simpleDateFormat.format(date)); final Calendar calendar = Calendar.getInstance(getTimeZone()); calendar.setTime(date); calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0); + System.out.println("DateHelper getCalendarOfDate(): " + simpleDateFormat.format(calendar.getTime())); return calendar; } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/LocaleHelper.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java old mode 100644 new mode 100755 index c0cdf941..b79611cd --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/SingleDateAndTimePicker.java @@ -229,6 +229,7 @@ public void onFinishedLoop(WheelHourPicker picker) { .setHourChangedListener(new WheelHourPicker.OnHourChangedListener() { @Override public void onHourChanged(WheelHourPicker picker, int hour) { + System.out.println("SingleDateAndTimePicker onHourChanged(): hour -> " + hour); updateListener(); checkMinMaxDate(picker); } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BaseDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/BottomSheetHelper.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/DoubleDateAndTimePickerDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/dialog/SingleDateAndTimePickerDialog.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/DateWithLabel.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/SingleDateAndTimeConstants.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelAmPmPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayOfMonthPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelDayPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java old mode 100644 new mode 100755 index cc5380c9..d5855ceb --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelHourPicker.java @@ -95,7 +95,6 @@ public void setDefault(String defaultValue) { if (isAmPm && hour >= MAX_HOUR_AM_PM) { hour -= MAX_HOUR_AM_PM; } - super.setDefault(getFormattedValue(hour)); } catch (Exception e){ e.printStackTrace(); @@ -106,6 +105,8 @@ public void setIsAmPm(boolean isAmPm) { this.isAmPm = isAmPm; if (isAmPm) { setMaxHour(MAX_HOUR_AM_PM); + // To fix NOT updating afternoon hour, by yeojong + setDefault(defaultValue); } else { setMaxHour(MAX_HOUR_DEFAULT); } @@ -134,7 +135,7 @@ public void setStepSizeHours(int hoursStep) { } private int convertItemToHour(Object item) { - Integer hour = Integer.valueOf(String.valueOf(item)); + int hour = Integer.parseInt(String.valueOf(item)); if (!isAmPm) { return hour; } @@ -142,7 +143,6 @@ private int convertItemToHour(Object item) { if (hour == 12) { hour = 0; } - return hour; } diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMinutePicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelMonthPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java old mode 100644 new mode 100755 index 10f96f96..4b3f41d7 --- a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java +++ b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelPicker.java @@ -1008,10 +1008,6 @@ public int findIndexOfDate(@NonNull Date date) { if (formatItemInt != Integer.MIN_VALUE) { // displayed values are Integers int objectInt = Integer.parseInt(object); - if (this instanceof WheelHourPicker && ((WheelHourPicker) this).isAmPm) { - // In case of hours and AM/PM mode, apply modulo 12 - objectInt = objectInt % 12; - } if (objectInt <= formatItemInt) { index = i; } @@ -1174,4 +1170,4 @@ public int getItemPosition(V value) { return position; } } -} +} \ No newline at end of file diff --git a/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java b/singledateandtimepicker/src/main/java/com/github/florent37/singledateandtimepicker/widget/WheelYearPicker.java old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml b/singledateandtimepicker/src/main/res/color/date_picker_am_pm_text_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml b/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml b/singledateandtimepicker/src/main/res/color/double_date_picker_button_text_selector_ios.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml b/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml b/singledateandtimepicker/src/main/res/drawable/double_date_picker_button_background_selector_ios.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/drawable/picker_divider.xml b/singledateandtimepicker/src/main/res/drawable/picker_divider.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout-v21/bottom_sheet_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_double_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml b/singledateandtimepicker/src/main/res/layout/bottom_sheet_picker_bottom_sheet.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml b/singledateandtimepicker/src/main/res/layout/single_day_and_time_picker.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ca/strings.xml b/singledateandtimepicker/src/main/res/values-ca/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-cs/strings.xml b/singledateandtimepicker/src/main/res/values-cs/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-da/strings.xml b/singledateandtimepicker/src/main/res/values-da/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-de/strings.xml b/singledateandtimepicker/src/main/res/values-de/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-es/strings.xml b/singledateandtimepicker/src/main/res/values-es/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-fi/strings.xml b/singledateandtimepicker/src/main/res/values-fi/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-fr/strings.xml b/singledateandtimepicker/src/main/res/values-fr/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-id/strings.xml b/singledateandtimepicker/src/main/res/values-id/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-it/strings.xml b/singledateandtimepicker/src/main/res/values-it/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ko/strings.xml b/singledateandtimepicker/src/main/res/values-ko/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-lt/strings.xml b/singledateandtimepicker/src/main/res/values-lt/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ms/strings.xml b/singledateandtimepicker/src/main/res/values-ms/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-nb/strings.xml b/singledateandtimepicker/src/main/res/values-nb/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-pt/strings.xml b/singledateandtimepicker/src/main/res/values-pt/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-ru/strings.xml b/singledateandtimepicker/src/main/res/values-ru/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-sv/strings.xml b/singledateandtimepicker/src/main/res/values-sv/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-th/strings.xml b/singledateandtimepicker/src/main/res/values-th/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-tr/strings.xml b/singledateandtimepicker/src/main/res/values-tr/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-uk/strings.xml b/singledateandtimepicker/src/main/res/values-uk/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-vi/strings.xml b/singledateandtimepicker/src/main/res/values-vi/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values-zh/strings.xml b/singledateandtimepicker/src/main/res/values-zh/strings.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/attrs.xml b/singledateandtimepicker/src/main/res/values/attrs.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/colors.xml b/singledateandtimepicker/src/main/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/dimens.xml b/singledateandtimepicker/src/main/res/values/dimens.xml old mode 100644 new mode 100755 diff --git a/singledateandtimepicker/src/main/res/values/strings.xml b/singledateandtimepicker/src/main/res/values/strings.xml old mode 100644 new mode 100755