From 066c5f6b66741e892154b52c557b5bd161a2185e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Thu, 26 Sep 2024 16:21:42 +0530 Subject: [PATCH] Fix ui for tablets --- .../org/dmfs/tasks/EmptyTaskFragment.java | 1 - .../main/res/layout/activity_task_twopane.xml | 65 +++++------ .../layout/activity_task_twopane_small.xml | 103 ++++++++++-------- .../src/main/res/values-large-land/bools.xml | 6 - .../src/main/res/values-large-land/dimens.xml | 6 - .../src/main/res/values-large-land/refs.xml | 19 ---- .../src/main/res/values-large-land/styles.xml | 9 -- opentasks/src/main/res/values-large/bools.xml | 4 - .../src/main/res/values-large/dimens.xml | 9 -- .../src/main/res/values-large/styles.xml | 28 ----- .../main/res/values-sw600dp-land/bools.xml | 6 - .../main/res/values-sw600dp-land/dimens.xml | 5 - .../src/main/res/values-sw600dp-land/refs.xml | 18 --- .../main/res/values-sw600dp-land/styles.xml | 9 -- .../src/main/res/values-sw600dp/bools.xml | 6 - .../src/main/res/values-sw600dp/dimens.xml | 10 -- .../src/main/res/values-sw600dp/styles.xml | 29 ----- .../main/res/values-sw720dp-land/dimens.xml | 9 +- .../refs.xml | 5 +- .../main/res/values-sw720dp-port/dimens.xml | 2 - .../src/main/res/values-sw720dp-port/refs.xml | 3 - .../src/main/res/values-xlarge-port/bools.xml | 4 - 22 files changed, 96 insertions(+), 260 deletions(-) delete mode 100644 opentasks/src/main/res/values-large-land/bools.xml delete mode 100644 opentasks/src/main/res/values-large-land/dimens.xml delete mode 100644 opentasks/src/main/res/values-large-land/refs.xml delete mode 100644 opentasks/src/main/res/values-large-land/styles.xml delete mode 100644 opentasks/src/main/res/values-large/bools.xml delete mode 100644 opentasks/src/main/res/values-large/dimens.xml delete mode 100644 opentasks/src/main/res/values-large/styles.xml delete mode 100644 opentasks/src/main/res/values-sw600dp-land/bools.xml delete mode 100644 opentasks/src/main/res/values-sw600dp-land/dimens.xml delete mode 100644 opentasks/src/main/res/values-sw600dp-land/refs.xml delete mode 100644 opentasks/src/main/res/values-sw600dp-land/styles.xml delete mode 100644 opentasks/src/main/res/values-sw600dp/bools.xml delete mode 100644 opentasks/src/main/res/values-sw600dp/dimens.xml delete mode 100644 opentasks/src/main/res/values-sw600dp/styles.xml rename opentasks/src/main/res/{values-xlarge-port => values-sw720dp-land}/refs.xml (77%) delete mode 100644 opentasks/src/main/res/values-xlarge-port/bools.xml diff --git a/opentasks/src/main/java/org/dmfs/tasks/EmptyTaskFragment.java b/opentasks/src/main/java/org/dmfs/tasks/EmptyTaskFragment.java index b9791348..4b93c061 100644 --- a/opentasks/src/main/java/org/dmfs/tasks/EmptyTaskFragment.java +++ b/opentasks/src/main/java/org/dmfs/tasks/EmptyTaskFragment.java @@ -73,7 +73,6 @@ public class EmptyTaskFragment extends SupportFragment public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.opentasks_fragment_empty_task, container, false); - view.findViewById(R.id.empty_task_fragment_appbar).setBackgroundColor(mColor.argb()); return view; } } diff --git a/opentasks/src/main/res/layout/activity_task_twopane.xml b/opentasks/src/main/res/layout/activity_task_twopane.xml index e33c9eda..1a58bc8e 100644 --- a/opentasks/src/main/res/layout/activity_task_twopane.xml +++ b/opentasks/src/main/res/layout/activity_task_twopane.xml @@ -1,56 +1,47 @@ - + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + app:tabBackground="@color/primary_dark" + app:tabMode="fixed"/> - - - + tools:context=".MainActivity" + app:layout_constraintTop_toBottomOf="@id/appbar" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="@id/pager"/> + + - \ No newline at end of file + \ No newline at end of file diff --git a/opentasks/src/main/res/layout/activity_task_twopane_small.xml b/opentasks/src/main/res/layout/activity_task_twopane_small.xml index 33230a59..37ad2b84 100644 --- a/opentasks/src/main/res/layout/activity_task_twopane_small.xml +++ b/opentasks/src/main/res/layout/activity_task_twopane_small.xml @@ -1,53 +1,70 @@ - - - + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - - + + + - + + - + - \ No newline at end of file + \ No newline at end of file diff --git a/opentasks/src/main/res/values-large-land/bools.xml b/opentasks/src/main/res/values-large-land/bools.xml deleted file mode 100644 index e5436733..00000000 --- a/opentasks/src/main/res/values-large-land/bools.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-large-land/dimens.xml b/opentasks/src/main/res/values-large-land/dimens.xml deleted file mode 100644 index e034564d..00000000 --- a/opentasks/src/main/res/values-large-land/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 10dp - 360dp - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-large-land/refs.xml b/opentasks/src/main/res/values-large-land/refs.xml deleted file mode 100644 index aacdabbc..00000000 --- a/opentasks/src/main/res/values-large-land/refs.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - @layout/activity_task_twopane_small - - @layout/fragment_task_edit_detail_twopane - - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-large-land/styles.xml b/opentasks/src/main/res/values-large-land/styles.xml deleted file mode 100644 index afd3c4d0..00000000 --- a/opentasks/src/main/res/values-large-land/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-large/bools.xml b/opentasks/src/main/res/values-large/bools.xml deleted file mode 100644 index 0f2ac08b..00000000 --- a/opentasks/src/main/res/values-large/bools.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - false - diff --git a/opentasks/src/main/res/values-large/dimens.xml b/opentasks/src/main/res/values-large/dimens.xml deleted file mode 100644 index 2162c2d0..00000000 --- a/opentasks/src/main/res/values-large/dimens.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 10dp - 10dp - 104dp - -66dp - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-large/styles.xml b/opentasks/src/main/res/values-large/styles.xml deleted file mode 100644 index 07e59fcd..00000000 --- a/opentasks/src/main/res/values-large/styles.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp-land/bools.xml b/opentasks/src/main/res/values-sw600dp-land/bools.xml deleted file mode 100644 index e5436733..00000000 --- a/opentasks/src/main/res/values-sw600dp-land/bools.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp-land/dimens.xml b/opentasks/src/main/res/values-sw600dp-land/dimens.xml deleted file mode 100644 index 94f5b2da..00000000 --- a/opentasks/src/main/res/values-sw600dp-land/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 10dp - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp-land/refs.xml b/opentasks/src/main/res/values-sw600dp-land/refs.xml deleted file mode 100644 index 3aa3fd4a..00000000 --- a/opentasks/src/main/res/values-sw600dp-land/refs.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - @layout/activity_task_twopane - - @layout/fragment_task_edit_detail_twopane - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp-land/styles.xml b/opentasks/src/main/res/values-sw600dp-land/styles.xml deleted file mode 100644 index afd3c4d0..00000000 --- a/opentasks/src/main/res/values-sw600dp-land/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp/bools.xml b/opentasks/src/main/res/values-sw600dp/bools.xml deleted file mode 100644 index 691b11d4..00000000 --- a/opentasks/src/main/res/values-sw600dp/bools.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - false - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp/dimens.xml b/opentasks/src/main/res/values-sw600dp/dimens.xml deleted file mode 100644 index 32e94693..00000000 --- a/opentasks/src/main/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - 10dp - 10dp - 128dp - -80dp - 360dp - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw600dp/styles.xml b/opentasks/src/main/res/values-sw600dp/styles.xml deleted file mode 100644 index e8321d57..00000000 --- a/opentasks/src/main/res/values-sw600dp/styles.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw720dp-land/dimens.xml b/opentasks/src/main/res/values-sw720dp-land/dimens.xml index dfef51ea..cd5ddc80 100644 --- a/opentasks/src/main/res/values-sw720dp-land/dimens.xml +++ b/opentasks/src/main/res/values-sw720dp-land/dimens.xml @@ -1,10 +1,3 @@ - - - 128dp - 10dp - + 432dp \ No newline at end of file diff --git a/opentasks/src/main/res/values-xlarge-port/refs.xml b/opentasks/src/main/res/values-sw720dp-land/refs.xml similarity index 77% rename from opentasks/src/main/res/values-xlarge-port/refs.xml rename to opentasks/src/main/res/values-sw720dp-land/refs.xml index 3aa3fd4a..f0a09bfb 100644 --- a/opentasks/src/main/res/values-xlarge-port/refs.xml +++ b/opentasks/src/main/res/values-sw720dp-land/refs.xml @@ -11,8 +11,5 @@ @layout/activity_task_twopane - @layout/fragment_task_edit_detail_twopane - - + \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw720dp-port/dimens.xml b/opentasks/src/main/res/values-sw720dp-port/dimens.xml index d4f39d6f..50db893e 100644 --- a/opentasks/src/main/res/values-sw720dp-port/dimens.xml +++ b/opentasks/src/main/res/values-sw720dp-port/dimens.xml @@ -1,5 +1,3 @@ - 360dp - \ No newline at end of file diff --git a/opentasks/src/main/res/values-sw720dp-port/refs.xml b/opentasks/src/main/res/values-sw720dp-port/refs.xml index ca3c9025..cc615a49 100644 --- a/opentasks/src/main/res/values-sw720dp-port/refs.xml +++ b/opentasks/src/main/res/values-sw720dp-port/refs.xml @@ -11,8 +11,5 @@ @layout/activity_task_twopane_small - @layout/fragment_task_edit_detail_twopane - \ No newline at end of file diff --git a/opentasks/src/main/res/values-xlarge-port/bools.xml b/opentasks/src/main/res/values-xlarge-port/bools.xml deleted file mode 100644 index 9b999fec..00000000 --- a/opentasks/src/main/res/values-xlarge-port/bools.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - true - -- GitLab