Remove magic paddings from bookmark view
Use calculated sizes to correctly center without the need for
"magic" padding values.
Change-Id: Ida64a80243df9bf05355dd1db1047fc16c10b726
diff --git a/res/layout-xlarge/bookmarks_history.xml b/res/layout-sw600dp/bookmarks_history.xml
similarity index 100%
rename from res/layout-xlarge/bookmarks_history.xml
rename to res/layout-sw600dp/bookmarks_history.xml
diff --git a/res/layout-xlarge/history.xml b/res/layout-sw600dp/history.xml
similarity index 100%
rename from res/layout-xlarge/history.xml
rename to res/layout-sw600dp/history.xml
diff --git a/res/layout/bookmark_grid_row.xml b/res/layout/bookmark_grid_row.xml
index 5dc3a76..7955ad7 100644
--- a/res/layout/bookmark_grid_row.xml
+++ b/res/layout/bookmark_grid_row.xml
@@ -17,8 +17,6 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/combo_rowPadding"
- android:paddingRight="@dimen/combo_rowPadding">
+ android:layout_height="match_parent">
</LinearLayout>
diff --git a/res/layout/bookmarks.xml b/res/layout/bookmarks.xml
index bcabc03..4a13c6f 100644
--- a/res/layout/bookmarks.xml
+++ b/res/layout/bookmarks.xml
@@ -20,9 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingTop="@dimen/combo_paddingTop"
- android:paddingLeft="@dimen/combo_paddingLeftRight"
- android:paddingRight="@dimen/combo_paddingLeftRight">
+ android:paddingTop="@dimen/combo_paddingTop">
<FrameLayout
android:id="@+id/header_container"
diff --git a/res/values-sw600dp-port/dimensions.xml b/res/values-sw600dp-port/dimensions.xml
index 3ba38fe..682bbaf 100644
--- a/res/values-sw600dp-port/dimensions.xml
+++ b/res/values-sw600dp-port/dimensions.xml
@@ -14,7 +14,5 @@
<dimen name="widgetThumbnailHeight">84dip</dimen>
<dimen name="widgetHorizontalSpacing">6dip</dimen>
<dimen name="widgetVerticalSpacing">6dip</dimen>
- <dimen name="combo_paddingLeftRight">16dip</dimen>
- <dimen name="combo_horizontalSpacing">8dip</dimen>
- <dimen name="combo_rowPadding">10dip</dimen>
+ <dimen name="combo_horizontalSpacing">4dip</dimen>
</resources>
diff --git a/res/values-sw600dp/dimensions.xml b/res/values-sw600dp/dimensions.xml
index 82fc37e..977148b 100644
--- a/res/values-sw600dp/dimensions.xml
+++ b/res/values-sw600dp/dimensions.xml
@@ -25,9 +25,7 @@
<dimen name="mv_border_width">3dp</dimen>
<!-- For the combined Bookmarks History view -->
<dimen name="combo_paddingTop">50dip</dimen>
- <dimen name="combo_paddingLeftRight">134dip</dimen>
<dimen name="combo_horizontalSpacing">8dip</dimen>
- <dimen name="combo_rowPadding">10dip</dimen>
<dimen name="qc_radius_start">50dip</dimen>
<dimen name="qc_radius_increment">70dip</dimen>
<dimen name="qc_slop">15dip</dimen>
diff --git a/res/values-xlarge/styles.xml b/res/values-sw600dp/styles.xml
similarity index 100%
rename from res/values-xlarge/styles.xml
rename to res/values-sw600dp/styles.xml
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index dbb0c60..950de5b 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -55,9 +55,7 @@
<dimen name="widgetVerticalSpacing">12dip</dimen>
<!-- For the combined Bookmarks History view -->
<dimen name="combo_paddingTop">10dip</dimen>
- <dimen name="combo_paddingLeftRight">0dip</dimen>
<dimen name="combo_horizontalSpacing">6dip</dimen>
- <dimen name="combo_rowPadding">0dip</dimen>
<dimen name="tab_view_thumbnail_height">76dip</dimen>
<!-- Preference activity side margins -->
<dimen name="preference_screen_side_margin">0dp</dimen>
diff --git a/res/values/integers.xml b/res/values/integers.xml
index ad0ed90..5a8c15f 100644
--- a/res/values/integers.xml
+++ b/res/values/integers.xml
@@ -27,4 +27,6 @@
<integer name="comboViewFadeInDuration">400</integer>
<!-- fade between tabs duration -->
<integer name="tabFadeDuration">300</integer>
+ <!-- The maximum number of columns in the bookmark grid view -->
+ <integer name="max_bookmark_columns">5</integer>
</resources>