From cbb220b1ac33718d2a460f6f6813ad801df5ca05 Mon Sep 17 00:00:00 2001 From: "BORNINTERACTIVE\\ahariss" Date: Wed, 6 Sep 2017 14:21:49 +0300 Subject: [PATCH 1/3] Fix Date Dialog extra right space on android 7.0+ --- src/android/DatePickerPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/android/DatePickerPlugin.java b/src/android/DatePickerPlugin.java index b76edcc..d0cb4a6 100644 --- a/src/android/DatePickerPlugin.java +++ b/src/android/DatePickerPlugin.java @@ -168,6 +168,11 @@ private void prepareDialog(final DatePickerDialog dateDialog, final OnDateSetLis if (!jsonDate.titleText.isEmpty()){ dateDialog.setTitle(jsonDate.titleText); } + View dialogView = dateDialog.getDatePicker().getChildAt(0); + if (dialogView != null) { + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT); + dialogView.setLayoutParams(params); + } if (!jsonDate.todayText.isEmpty()){ dateDialog.setButton(DialogInterface.BUTTON_NEUTRAL, jsonDate.todayText, new DialogInterface.OnClickListener() { @Override From 985db44d7ca760966096fef2b13c3460afe571a2 Mon Sep 17 00:00:00 2001 From: "BORNINTERACTIVE\\ahariss" Date: Wed, 6 Sep 2017 14:37:41 +0300 Subject: [PATCH 2/3] Fix Date Dialog extra right space on android 7.0+ --- src/android/DatePickerPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/android/DatePickerPlugin.java b/src/android/DatePickerPlugin.java index d0cb4a6..41a41b9 100644 --- a/src/android/DatePickerPlugin.java +++ b/src/android/DatePickerPlugin.java @@ -36,6 +36,7 @@ import android.widget.DatePicker; import android.widget.DatePicker.OnDateChangedListener; import android.widget.TimePicker; +import android.widget.FrameLayout; @SuppressLint("NewApi") public class DatePickerPlugin extends CordovaPlugin { From afc8b7177919d37e9812fa852992d6bf1effff84 Mon Sep 17 00:00:00 2001 From: "BORNINTERACTIVE\\ahariss" Date: Wed, 6 Sep 2017 14:41:24 +0300 Subject: [PATCH 3/3] Fix Date Dialog extra right space on android 7.0+ --- src/android/DatePickerPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/android/DatePickerPlugin.java b/src/android/DatePickerPlugin.java index 41a41b9..f26d4d6 100644 --- a/src/android/DatePickerPlugin.java +++ b/src/android/DatePickerPlugin.java @@ -36,6 +36,7 @@ import android.widget.DatePicker; import android.widget.DatePicker.OnDateChangedListener; import android.widget.TimePicker; +import android.view.View; import android.widget.FrameLayout; @SuppressLint("NewApi")