From b7899f95c08e1e281f4cd0909c40eb2968b0d23b Mon Sep 17 00:00:00 2001 From: "M.Amin Hassani" Date: Sun, 3 Jan 2021 17:22:45 +0330 Subject: [PATCH] Fixing ui symmetricity on api<17 --- README.md | 2 +- build.gradle | 2 +- .../main/res/layout/action_bar_container.xml | 12 ++++---- .../res/layout/action_bar_container_rtl.xml | 12 ++++---- .../fragment_date_picker_bottom_sheet.xml | 8 +++--- .../layout/fragment_date_picker_dialog.xml | 4 +-- .../src/main/res/layout/goto_container.xml | 8 +++--- .../main/res/layout/goto_container_rtl.xml | 8 +++--- .../main/res/layout/list_item_picked_day.xml | 4 +-- .../res/layout/list_item_picked_day_empty.xml | 4 +-- .../selection_bar_multiple_days_container.xml | 7 +++-- .../selection_bar_range_days_container.xml | 8 +++--- ...selection_bar_range_days_container_rtl.xml | 28 +++++++++---------- .../selection_bar_single_day_container.xml | 4 +-- 14 files changed, 56 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index fa62ae74..3d01db53 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ repositories { } dependencies { - implementation 'com.aminography:primedatepicker:3.3.1' + implementation 'com.aminography:primedatepicker:3.3.2' implementation 'com.aminography:primecalendar:1.3.2' } ``` diff --git a/build.gradle b/build.gradle index a5ca690b..d494aaa2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { def versionMajor = 3 // X def versionMinor = 3 // Y - def versionPatch = 1 // Z + def versionPatch = 2 // Z ext.version_code = versionMajor * 10000 + versionMinor * 100 + versionPatch ext.version_name = "${versionMajor}.${versionMinor}.${versionPatch}" diff --git a/library/src/main/res/layout/action_bar_container.xml b/library/src/main/res/layout/action_bar_container.xml index bcf74428..0fbd5706 100644 --- a/library/src/main/res/layout/action_bar_container.xml +++ b/library/src/main/res/layout/action_bar_container.xml @@ -21,9 +21,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/material_size_12" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" @@ -48,9 +48,9 @@ android:id="@+id/negativeTwoLineTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" @@ -76,9 +76,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/material_size_12" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/library/src/main/res/layout/action_bar_container_rtl.xml b/library/src/main/res/layout/action_bar_container_rtl.xml index c46a5032..af543d55 100644 --- a/library/src/main/res/layout/action_bar_container_rtl.xml +++ b/library/src/main/res/layout/action_bar_container_rtl.xml @@ -21,9 +21,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/material_size_12" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" @@ -48,9 +48,9 @@ android:id="@+id/negativeTwoLineTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" @@ -76,9 +76,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/material_size_12" - android:paddingStart="@dimen/material_size_12" + android:paddingLeft="@dimen/material_size_12" android:paddingTop="@dimen/material_size_8" - android:paddingEnd="@dimen/material_size_12" + android:paddingRight="@dimen/material_size_12" android:paddingBottom="@dimen/material_size_8" app:bottomLabelTextSize="0dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/library/src/main/res/layout/fragment_date_picker_bottom_sheet.xml b/library/src/main/res/layout/fragment_date_picker_bottom_sheet.xml index 66fe6b70..e8f92e8f 100644 --- a/library/src/main/res/layout/fragment_date_picker_bottom_sheet.xml +++ b/library/src/main/res/layout/fragment_date_picker_bottom_sheet.xml @@ -29,10 +29,10 @@ android:id="@+id/selectionBarLayout" android:layout_width="0dp" android:layout_height="wrap_content" - android:paddingStart="8dp" - android:paddingTop="4dp" - android:paddingEnd="8dp" - android:paddingBottom="2dp" + android:paddingLeft="@dimen/material_size_8" + android:paddingTop="@dimen/material_size_4" + android:paddingRight="@dimen/material_size_8" + android:paddingBottom="@dimen/material_size_2" app:layout_constraintBottom_toTopOf="@id/calendarView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/library/src/main/res/layout/fragment_date_picker_dialog.xml b/library/src/main/res/layout/fragment_date_picker_dialog.xml index cb2eb45a..97d8bab6 100644 --- a/library/src/main/res/layout/fragment_date_picker_dialog.xml +++ b/library/src/main/res/layout/fragment_date_picker_dialog.xml @@ -19,10 +19,10 @@ android:id="@+id/selectionBarLayout" android:layout_width="0dp" android:layout_height="wrap_content" - android:paddingStart="8dp" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="8dp" android:paddingBottom="2dp" - android:paddingEnd="8dp" + android:paddingRight="@dimen/material_size_8" app:layout_constraintBottom_toTopOf="@id/calendarView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/library/src/main/res/layout/goto_container.xml b/library/src/main/res/layout/goto_container.xml index a32d794b..86f40d22 100644 --- a/library/src/main/res/layout/goto_container.xml +++ b/library/src/main/res/layout/goto_container.xml @@ -55,9 +55,9 @@ android:id="@+id/closeButtonImageView" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/material_size_16" + android:layout_marginLeft="@dimen/material_size_16" android:layout_marginTop="@dimen/material_size_8" - android:layout_marginEnd="@dimen/material_size_16" + android:layout_marginRight="@dimen/material_size_16" android:alpha="0.67" android:paddingTop="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_8" @@ -80,8 +80,8 @@ android:id="@+id/goButtonImageView" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/material_size_16" - android:layout_marginEnd="@dimen/material_size_16" + android:layout_marginLeft="@dimen/material_size_16" + android:layout_marginRight="@dimen/material_size_16" android:layout_marginBottom="@dimen/material_size_4" android:alpha="0.67" android:paddingTop="@dimen/material_size_8" diff --git a/library/src/main/res/layout/goto_container_rtl.xml b/library/src/main/res/layout/goto_container_rtl.xml index 7e959278..412ab393 100644 --- a/library/src/main/res/layout/goto_container_rtl.xml +++ b/library/src/main/res/layout/goto_container_rtl.xml @@ -55,9 +55,9 @@ android:id="@+id/closeButtonImageView" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/material_size_16" + android:layout_marginLeft="@dimen/material_size_16" android:layout_marginTop="@dimen/material_size_8" - android:layout_marginEnd="@dimen/material_size_16" + android:layout_marginRight="@dimen/material_size_16" android:alpha="0.67" android:paddingTop="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_8" @@ -80,8 +80,8 @@ android:id="@+id/goButtonImageView" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/material_size_16" - android:layout_marginEnd="@dimen/material_size_16" + android:layout_marginLeft="@dimen/material_size_16" + android:layout_marginRight="@dimen/material_size_16" android:layout_marginBottom="@dimen/material_size_4" android:alpha="0.67" android:paddingTop="@dimen/material_size_8" diff --git a/library/src/main/res/layout/list_item_picked_day.xml b/library/src/main/res/layout/list_item_picked_day.xml index eab35817..28124787 100644 --- a/library/src/main/res/layout/list_item_picked_day.xml +++ b/library/src/main/res/layout/list_item_picked_day.xml @@ -18,9 +18,9 @@ android:id="@+id/twoLineTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" app:bottomLabelTextColor="@color/white" app:bottomLabelTextSize="@dimen/text_size_header_multi_small" diff --git a/library/src/main/res/layout/list_item_picked_day_empty.xml b/library/src/main/res/layout/list_item_picked_day_empty.xml index 05ba0172..3086325f 100644 --- a/library/src/main/res/layout/list_item_picked_day_empty.xml +++ b/library/src/main/res/layout/list_item_picked_day_empty.xml @@ -17,9 +17,9 @@ android:id="@+id/twoLineTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" app:bottomLabelTextColor="@color/transparent" app:bottomLabelTextSize="@dimen/text_size_header_multi_small" diff --git a/library/src/main/res/layout/selection_bar_multiple_days_container.xml b/library/src/main/res/layout/selection_bar_multiple_days_container.xml index 6ec0ef64..14a192f8 100644 --- a/library/src/main/res/layout/selection_bar_multiple_days_container.xml +++ b/library/src/main/res/layout/selection_bar_multiple_days_container.xml @@ -26,13 +26,14 @@ android:clipChildren="false" android:clipToPadding="true" android:fadingEdgeLength="@dimen/material_size_2" - android:paddingStart="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_4" + android:paddingLeft="@dimen/material_size_4" + android:paddingRight="@dimen/material_size_4" android:requiresFadingEdge="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - tools:listitem="@layout/list_item_picked_day" /> + tools:listitem="@layout/list_item_picked_day" + tools:targetApi="ice_cream_sandwich" /> \ No newline at end of file diff --git a/library/src/main/res/layout/selection_bar_range_days_container.xml b/library/src/main/res/layout/selection_bar_range_days_container.xml index 417d9d4a..c6b49dc6 100644 --- a/library/src/main/res/layout/selection_bar_range_days_container.xml +++ b/library/src/main/res/layout/selection_bar_range_days_container.xml @@ -47,9 +47,9 @@ android:layout_gravity="center" android:layout_marginStart="@dimen/material_size_4" android:layout_marginLeft="@dimen/material_size_4" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" app:topLabelText="@string/prime_date_picker_from" app:topLabelTextColor="@color/white" @@ -69,9 +69,9 @@ android:layout_gravity="center" android:layout_marginEnd="@dimen/material_size_4" android:layout_marginRight="@dimen/material_size_4" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" app:topLabelText="@string/prime_date_picker_to" app:topLabelTextColor="@color/white" diff --git a/library/src/main/res/layout/selection_bar_range_days_container_rtl.xml b/library/src/main/res/layout/selection_bar_range_days_container_rtl.xml index 8ba8a44a..a0ca9430 100644 --- a/library/src/main/res/layout/selection_bar_range_days_container_rtl.xml +++ b/library/src/main/res/layout/selection_bar_range_days_container_rtl.xml @@ -47,20 +47,20 @@ android:layout_gravity="center" android:layout_marginEnd="@dimen/material_size_4" android:layout_marginRight="@dimen/material_size_4" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" - app:topLabelText="@string/prime_date_picker_from" - app:topLabelTextColor="@color/white" - app:topLabelTextSize="@dimen/text_size_small" + app:bottomLabelTextColor="@color/white" + app:bottomLabelTextSize="@dimen/text_size_normal" app:gapBetweenLines="@dimen/defaultGapBetweenLines" app:layout_constraintBottom_toBottomOf="@id/rangeStartBackView" app:layout_constraintEnd_toEndOf="@id/rangeStartBackView" app:layout_constraintStart_toStartOf="@id/rangeStartBackView" app:layout_constraintTop_toTopOf="@id/rangeStartBackView" - app:bottomLabelTextColor="@color/white" - app:bottomLabelTextSize="@dimen/text_size_normal" /> + app:topLabelText="@string/prime_date_picker_from" + app:topLabelTextColor="@color/white" + app:topLabelTextSize="@dimen/text_size_small" /> + app:topLabelText="@string/prime_date_picker_to" + app:topLabelTextColor="@color/white" + app:topLabelTextSize="@dimen/text_size_small" /> \ No newline at end of file diff --git a/library/src/main/res/layout/selection_bar_single_day_container.xml b/library/src/main/res/layout/selection_bar_single_day_container.xml index a7399327..505725e4 100644 --- a/library/src/main/res/layout/selection_bar_single_day_container.xml +++ b/library/src/main/res/layout/selection_bar_single_day_container.xml @@ -10,9 +10,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:paddingStart="@dimen/material_size_8" + android:paddingLeft="@dimen/material_size_8" android:paddingTop="@dimen/material_size_4" - android:paddingEnd="@dimen/material_size_8" + android:paddingRight="@dimen/material_size_8" android:paddingBottom="@dimen/material_size_4" app:topLabelText="@string/prime_date_picker_selected_day" app:topLabelTextColor="@color/white"