From d4572a9d0e7dd3d9886cc8eca42ecef47e372147 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Wed, 16 May 2018 19:14:53 +0200 Subject: [PATCH] some Optimizations for tablets (#647) * show ComposeActivity as Dialog on tablets * limit timeline width on large devices * limit width on large devices for thread view and search * increase media preview size on large devices --- app/src/main/AndroidManifest.xml | 7 +-- .../background_dialog_activity.xml | 5 ++ .../drawable/background_dialog_activity.xml | 5 ++ .../res/layout-w640dp/fragment_timeline.xml | 20 ++++++++ .../layout-w640dp/fragment_view_thread.xml | 21 +++++++++ app/src/main/res/layout/activity_compose.xml | 8 ++-- app/src/main/res/layout/fragment_search.xml | 47 +++++++++++-------- app/src/main/res/values-large/dimens.xml | 6 +++ app/src/main/res/values-large/styles.xml | 12 +++++ app/src/main/res/values-night-v27/styles.xml | 2 +- app/src/main/res/values-night/styles.xml | 5 +- app/src/main/res/values-v27/styles.xml | 2 +- app/src/main/res/values-w640dp/dimens.xml | 3 ++ app/src/main/res/values/colors.xml | 4 +- app/src/main/res/values/dimens.xml | 4 ++ app/src/main/res/values/styles.xml | 5 +- 16 files changed, 122 insertions(+), 34 deletions(-) create mode 100644 app/src/main/res/drawable-night/background_dialog_activity.xml create mode 100644 app/src/main/res/drawable/background_dialog_activity.xml create mode 100644 app/src/main/res/layout-w640dp/fragment_timeline.xml create mode 100644 app/src/main/res/layout-w640dp/fragment_view_thread.xml create mode 100644 app/src/main/res/values-large/dimens.xml create mode 100644 app/src/main/res/values-large/styles.xml create mode 100644 app/src/main/res/values-w640dp/dimens.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 97e6a2da..e649e8a7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -15,7 +15,7 @@ android:label="@string/app_name" android:name=".TuskyApplication" android:supportsRtl="true" - android:theme="@style/AppTheme"> + android:theme="@style/TuskyTheme"> @@ -68,14 +69,14 @@ + android:theme="@style/TuskyBaseTheme" /> diff --git a/app/src/main/res/drawable-night/background_dialog_activity.xml b/app/src/main/res/drawable-night/background_dialog_activity.xml new file mode 100644 index 00000000..37a2b6c1 --- /dev/null +++ b/app/src/main/res/drawable-night/background_dialog_activity.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/background_dialog_activity.xml b/app/src/main/res/drawable/background_dialog_activity.xml new file mode 100644 index 00000000..06b36455 --- /dev/null +++ b/app/src/main/res/drawable/background_dialog_activity.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-w640dp/fragment_timeline.xml b/app/src/main/res/layout-w640dp/fragment_timeline.xml new file mode 100644 index 00000000..914b593a --- /dev/null +++ b/app/src/main/res/layout-w640dp/fragment_timeline.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-w640dp/fragment_view_thread.xml b/app/src/main/res/layout-w640dp/fragment_view_thread.xml new file mode 100644 index 00000000..2d6dad87 --- /dev/null +++ b/app/src/main/res/layout-w640dp/fragment_view_thread.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml index a62f0614..4a4090c9 100644 --- a/app/src/main/res/layout/activity_compose.xml +++ b/app/src/main/res/layout/activity_compose.xml @@ -25,7 +25,7 @@ @@ -257,8 +257,8 @@ + tools:text="500" /> + android:layout_height="match_parent" + android:background="?attr/tab_page_margin_drawable"> - + android:layout_gravity="center"> - + - + + + + diff --git a/app/src/main/res/values-large/dimens.xml b/app/src/main/res/values-large/dimens.xml new file mode 100644 index 00000000..046974e0 --- /dev/null +++ b/app/src/main/res/values-large/dimens.xml @@ -0,0 +1,6 @@ + + 400dp + + 160dp + 180dp + diff --git a/app/src/main/res/values-large/styles.xml b/app/src/main/res/values-large/styles.xml new file mode 100644 index 00000000..71044ab1 --- /dev/null +++ b/app/src/main/res/values-large/styles.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/values-night-v27/styles.xml b/app/src/main/res/values-night-v27/styles.xml index c8e6d6fb..51d8e816 100644 --- a/app/src/main/res/values-night-v27/styles.xml +++ b/app/src/main/res/values-night-v27/styles.xml @@ -1,7 +1,7 @@ - -