diff options
author | John Reck <jreck@google.com> | 2011-08-24 11:13:40 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-08-24 11:17:33 -0700 |
commit | 5636ca90acbb79c498c4dd0d94a946abe8c0ff52 (patch) | |
tree | 914f64e13fb09582ef0726edaa0c37d91313abae /res | |
parent | 4e772ec089ea2cb1844d7e2fca078dc12d98305c (diff) | |
download | packages_apps_Browser-5636ca90acbb79c498c4dd0d94a946abe8c0ff52.zip packages_apps_Browser-5636ca90acbb79c498c4dd0d94a946abe8c0ff52.tar.gz packages_apps_Browser-5636ca90acbb79c498c4dd0d94a946abe8c0ff52.tar.bz2 |
Widget resize support
Bug: 5058626
Add support for the new minimum resize API
Support resizing horizontally
Change default size for phone
Change-Id: I1e62ad0f9847da8f0b24c5d59667f0586dbcf232
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/bookmarkthumbnailwidget.xml | 3 | ||||
-rw-r--r-- | res/values-sw600dp-port/dimensions.xml | 3 | ||||
-rw-r--r-- | res/values-sw600dp/dimensions.xml | 3 | ||||
-rw-r--r-- | res/values/dimensions.xml | 7 | ||||
-rw-r--r-- | res/xml-sw600dp/bookmarkthumbnailwidget_info.xml | 29 | ||||
-rw-r--r-- | res/xml/bookmarkthumbnailwidget_info.xml | 8 |
6 files changed, 42 insertions, 11 deletions
diff --git a/res/layout/bookmarkthumbnailwidget.xml b/res/layout/bookmarkthumbnailwidget.xml index 3d7f7d0..967e4c1 100644 --- a/res/layout/bookmarkthumbnailwidget.xml +++ b/res/layout/bookmarkthumbnailwidget.xml @@ -25,7 +25,8 @@ android:id="@+id/bookmarks_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:numColumns="2" + android:numColumns="auto_fit" + android:columnWidth="@dimen/widgetColumnWidth" android:paddingTop="6dip" android:paddingRight="7dip" android:paddingLeft="7dip" diff --git a/res/values-sw600dp-port/dimensions.xml b/res/values-sw600dp-port/dimensions.xml index 682bbaf..c5771f5 100644 --- a/res/values-sw600dp-port/dimensions.xml +++ b/res/values-sw600dp-port/dimensions.xml @@ -11,8 +11,7 @@ License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <dimen name="widgetColumnWidth">110dip</dimen> <dimen name="widgetThumbnailHeight">84dip</dimen> - <dimen name="widgetHorizontalSpacing">6dip</dimen> - <dimen name="widgetVerticalSpacing">6dip</dimen> <dimen name="combo_horizontalSpacing">4dip</dimen> </resources> diff --git a/res/values-sw600dp/dimensions.xml b/res/values-sw600dp/dimensions.xml index bc87333..e4f1802 100644 --- a/res/values-sw600dp/dimensions.xml +++ b/res/values-sw600dp/dimensions.xml @@ -14,8 +14,7 @@ <dimen name="bookmarkThumbnailWidth">180dip</dimen> <dimen name="bookmarkThumbnailHeight">120dip</dimen> <dimen name="widgetThumbnailHeight">104dip</dimen> - <dimen name="widgetHorizontalSpacing">6dip</dimen> - <dimen name="widgetVerticalSpacing">6dip</dimen> + <dimen name="widgetColumnWidth">130dip</dimen> <dimen name="favicon_padded_size">28dip</dimen> <dimen name="add_bookmark_width">500dip</dimen> <!-- For the most visited page --> diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 279c53c..8e60355 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -47,9 +47,10 @@ <dimen name="list_favicon_padding">5dip</dimen> <dimen name="list_favicon_corner_radius">3dip</dimen> <dimen name="tab_favicon_corner_radius">2dip</dimen> - <dimen name="widgetThumbnailHeight">104dip</dimen> - <dimen name="widgetHorizontalSpacing">14dip</dimen> - <dimen name="widgetVerticalSpacing">12dip</dimen> + <dimen name="widgetThumbnailHeight">94dip</dimen> + <dimen name="widgetHorizontalSpacing">6dip</dimen> + <dimen name="widgetVerticalSpacing">6dip</dimen> + <dimen name="widgetColumnWidth">90dip</dimen> <!-- For the combined Bookmarks History view --> <dimen name="combo_paddingTop">0dip</dimen> <dimen name="combo_horizontalSpacing">6dip</dimen> diff --git a/res/xml-sw600dp/bookmarkthumbnailwidget_info.xml b/res/xml-sw600dp/bookmarkthumbnailwidget_info.xml new file mode 100644 index 0000000..99afda7 --- /dev/null +++ b/res/xml-sw600dp/bookmarkthumbnailwidget_info.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- 3x3 Widget displaying the user's bookmarks as a list with favicons. --> +<appwidget-provider + xmlns:android="http://schemas.android.com/apk/res/android" + android:minWidth="219dip" + android:minHeight="219dip" + android:minResizeHeight="72dip" + android:minResizeWidth="146dip" + android:updatePeriodMillis="0" + android:previewImage="@drawable/browser_widget_preview" + android:initialLayout="@layout/bookmarkthumbnailwidget" + android:resizeMode="vertical|horizontal" + android:configure="com.android.browser.widget.BookmarkWidgetConfigure"> +</appwidget-provider> diff --git a/res/xml/bookmarkthumbnailwidget_info.xml b/res/xml/bookmarkthumbnailwidget_info.xml index e98e3f7..bf2e612 100644 --- a/res/xml/bookmarkthumbnailwidget_info.xml +++ b/res/xml/bookmarkthumbnailwidget_info.xml @@ -14,14 +14,16 @@ limitations under the License. --> -<!-- 3x3 Widget displaying the user's bookmarks as a list with favicons. --> +<!-- 3x2 Widget displaying the user's bookmarks as a list with favicons. --> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="219dip" - android:minHeight="219dip" + android:minHeight="146dip" + android:minResizeHeight="72dip" + android:minResizeWidth="146dip" android:updatePeriodMillis="0" android:previewImage="@drawable/browser_widget_preview" android:initialLayout="@layout/bookmarkthumbnailwidget" - android:resizeMode="vertical" + android:resizeMode="vertical|horizontal" android:configure="com.android.browser.widget.BookmarkWidgetConfigure"> </appwidget-provider> |