From 3600873f3c886af9fef1738bce4f2f0f6ca9159a Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Fri, 14 Jun 2013 10:49:52 +0200 Subject: [PATCH] Improved layout and text sizes on large (tablet) screens. --- .../selectable_background_transdroid.xml | 1 + .../selectable_background_transdroid2.xml | 1 + core/res/layout-w600dp/activity_torrents.xml | 2 +- core/res/layout-w900dp/activity_torrents.xml | 2 +- core/res/layout/fragment_details_header.xml | 19 +++++------ core/res/layout/list_item_navigation.xml | 4 +-- core/res/layout/list_item_simple.xml | 2 +- core/res/layout/list_item_torrent.xml | 10 +++--- core/res/layout/list_item_torrentfile.xml | 6 ++-- core/res/values-sw500dp/dimens.xml | 21 ++++++++++++ core/res/values/dimens.xml | 14 ++++++++ core/res/values/styles.xml | 4 +-- .../transdroid/core/gui/DetailsFragment.java | 1 + .../transdroid/core/gui/TorrentsActivity.java | 32 ++++++++++--------- .../transdroid/core/gui/TorrentsFragment.java | 13 ++++---- 15 files changed, 87 insertions(+), 45 deletions(-) create mode 100644 core/res/values-sw500dp/dimens.xml diff --git a/core/res/drawable/selectable_background_transdroid.xml b/core/res/drawable/selectable_background_transdroid.xml index de42f6a1..77db9571 100644 --- a/core/res/drawable/selectable_background_transdroid.xml +++ b/core/res/drawable/selectable_background_transdroid.xml @@ -19,6 +19,7 @@ + \ No newline at end of file diff --git a/core/res/drawable/selectable_background_transdroid2.xml b/core/res/drawable/selectable_background_transdroid2.xml index 410647ca..5aab0bfc 100644 --- a/core/res/drawable/selectable_background_transdroid2.xml +++ b/core/res/drawable/selectable_background_transdroid2.xml @@ -20,6 +20,7 @@ + \ No newline at end of file diff --git a/core/res/layout-w600dp/activity_torrents.xml b/core/res/layout-w600dp/activity_torrents.xml index a06281b6..746cc9e0 100644 --- a/core/res/layout-w600dp/activity_torrents.xml +++ b/core/res/layout-w600dp/activity_torrents.xml @@ -14,7 +14,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:choiceMode="singleChoice" - android:listSelector="@drawable/selectable_background_transdroid" /> + android:listSelector="?attr/selectable_background_transdroid" /> + android:listSelector="?attr/selectable_background_transdroid" /> @@ -62,7 +63,7 @@ android:layout_below="@id/uploaded_text" android:layout_toRightOf="@id/separator" android:layout_marginLeft="@dimen/margin_half" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:textIsSelectable="false" /> @@ -85,7 +86,7 @@ android:layout_below="@id/upspeed_text" android:layout_toRightOf="@id/separator" android:layout_marginLeft="@dimen/margin_half" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:textIsSelectable="false" /> @@ -118,7 +119,7 @@ android:layout_alignBaseline="@id/ratio_text" android:layout_toLeftOf="@id/separator" android:layout_marginRight="@dimen/margin_half" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:textIsSelectable="false" /> @@ -140,7 +141,7 @@ android:layout_alignBaseline="@id/seeders_text" android:layout_toLeftOf="@id/separator" android:layout_marginRight="@dimen/margin_half" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:textIsSelectable="false" /> + android:textSize="@dimen/ui_navigation_filter" /> + android:textSize="@dimen/ui_navigation_server" /> \ No newline at end of file diff --git a/core/res/layout/list_item_simple.xml b/core/res/layout/list_item_simple.xml index 186cc380..1135bdfa 100644 --- a/core/res/layout/list_item_simple.xml +++ b/core/res/layout/list_item_simple.xml @@ -11,7 +11,7 @@ android:id="@+id/item_text" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textSize="15sp" + android:textSize="@dimen/text_default" android:textIsSelectable="false" android:autoLink="web" /> diff --git a/core/res/layout/list_item_torrent.xml b/core/res/layout/list_item_torrent.xml index 504ef7a1..0b9c8a30 100644 --- a/core/res/layout/list_item_torrent.xml +++ b/core/res/layout/list_item_torrent.xml @@ -14,7 +14,7 @@ android:paddingTop="@dimen/margin_half" android:textColor="?attr/text_bright" android:textIsSelectable="false" - android:textSize="15sp" /> + android:textSize="@dimen/text_enlarged" /> + android:textSize="@dimen/text_small" /> + android:textSize="@dimen/text_small" /> + android:textSize="@dimen/text_small" /> + android:textSize="@dimen/text_small" /> \ No newline at end of file diff --git a/core/res/layout/list_item_torrentfile.xml b/core/res/layout/list_item_torrentfile.xml index 444a6c1d..6fce1285 100644 --- a/core/res/layout/list_item_torrentfile.xml +++ b/core/res/layout/list_item_torrentfile.xml @@ -21,7 +21,7 @@ android:layout_alignParentTop="true" android:layout_toRightOf="@+id/file_checkbox" android:textColor="?attr/text_bright" - android:textSize="15sp" + android:textSize="@dimen/text_enlarged" android:textIsSelectable="false" android:focusable="false" /> @@ -33,7 +33,7 @@ android:layout_alignParentRight="true" android:layout_marginLeft="@dimen/margin_half" android:layout_marginTop="4dip" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:textIsSelectable="false" android:focusable="false" /> @@ -45,7 +45,7 @@ android:layout_alignBottom="@+id/progress_text" android:layout_toRightOf="@+id/priority_image" android:textIsSelectable="false" - android:textSize="12sp" + android:textSize="@dimen/text_small" android:focusable="false" /> + + + 16dp + 8dp + 16dp + + + 14sp + 17sp + 18sp + 27sp + 40sp + 14sp + + + 18sp + 15sp + 125dp + + \ No newline at end of file diff --git a/core/res/values/dimens.xml b/core/res/values/dimens.xml index 5cb23510..518bbae0 100644 --- a/core/res/values/dimens.xml +++ b/core/res/values/dimens.xml @@ -1,7 +1,21 @@ + 16dp 8dp 16dp + + 12sp + 15sp + 15sp + 22sp + 33sp + 12sp + + + 17sp + 14sp + 110dp + \ No newline at end of file diff --git a/core/res/values/styles.xml b/core/res/values/styles.xml index 8aec222e..eaf53d89 100644 --- a/core/res/values/styles.xml +++ b/core/res/values/styles.xml @@ -59,11 +59,11 @@