Cleanup Bookmarks, History, and SavedPages screen
- Redesigned bookmark thumbnail view
- Custom ImageView to scale the thumbnail properly
- Fix column count in bookmark expandable view
- Disable GroupView if we have only one account in bookmark
Change-Id: I2fccae50b9e96c909744bd5c7d0af7b373136c54
diff --git a/res/layout/bookmark_thumbnail.xml b/res/layout/bookmark_thumbnail.xml
index c7f9651..04d75c2 100644
--- a/res/layout/bookmark_thumbnail.xml
+++ b/res/layout/bookmark_thumbnail.xml
@@ -18,47 +18,35 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="@dimen/combo_horizontalSpacing"
+ android:paddingLeft="@dimen/combo_horizontalSpacing"
+ android:paddingRight="@dimen/combo_horizontalSpacing"
+ android:layout_margin="@dimen/combo_bookmark_thumbnail_margin"
android:background="@drawable/bookmark_thumb_selector"
+ android:orientation="vertical"
>
- <ImageView
- android:id="@+id/thumb"
- android:src="@drawable/browser_thumbnail"
- android:scaleType="centerCrop"
- android:layout_height="@dimen/bookmarkThumbnailHeight"
+ <com.android.browser.view.BookmarkThumbImageView
+ android:id="@+id/thumb_image"
android:layout_width="@dimen/bookmarkThumbnailWidth"
- android:layout_centerHorizontal="true"
- android:background="@drawable/border_thumb_bookmarks_widget_holo"
+ android:layout_height="@dimen/bookmarkThumbnailHeight"
+ android:paddingTop="2dip"
+ android:scaleType="centerCrop"
+ android:src="@drawable/browser_thumbnail"
/>
- <ImageView
- android:id="@+id/divider"
- android:src="?android:attr/dividerVertical"
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:layout_below="@+id/thumb"
- android:layout_alignLeft="@+id/thumb"
- android:scaleType="fitXY"
- android:layout_marginTop="12dip"
- />
-
- <TextView android:id="@+id/label"
+ <TextView
+ android:id="@+id/label"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_toRightOf="@id/divider"
- android:layout_alignTop="@id/divider"
- android:layout_alignBottom="@id/divider"
- android:layout_alignRight="@+id/thumb"
- android:paddingLeft="8dip"
- android:paddingRight="2dip"
- android:gravity="center_vertical"
- android:singleLine="true"
+ android:layout_height="wrap_content"
android:ellipsize="marquee"
- android:typeface="sans"
- android:textSize="14sp"
- android:textColor="#AAAAAA"
+ android:paddingLeft="8dip"
+ android:paddingRight="4dip"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:singleLine="true"
+ android:textColor="@color/black"
+ android:textSize="16sp"
+ android:fontFamily="sans-serif-light"
/>
</com.android.browser.view.BookmarkContainer>
diff --git a/res/layout/bookmarks.xml b/res/layout/bookmarks.xml
index 02a5a97..2475af3 100644
--- a/res/layout/bookmarks.xml
+++ b/res/layout/bookmarks.xml
@@ -41,26 +41,44 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/empty_bookmarks_folder"
android:visibility="gone" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/combo_shadow_height"
+ android:layout_gravity="bottom"
+ android:background="@drawable/shadow_top" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/combo_shadow_height"
+ android:layout_gravity="top"
+ android:background="@drawable/shadow_bottom" />
+
</FrameLayout>
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="horizontal"
android:layout_weight="10"
- android:layout_alignParentBottom="true" >
+ android:background="@color/primary"
+ style="?android:attr/buttonBarStyle" >
<Button
android:id="@+id/add_bookmark_button"
android:text="@string/add_new_bookmark"
- android:layout_width="match_parent"
+ android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
+ style="?android:attr/buttonBarButtonStyle"
/>
<Button
android:id="@+id/new_bmfolder_button"
android:text="@string/new_folder"
- android:layout_width="match_parent"
+ android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
+ style="?android:attr/buttonBarButtonStyle"
/>
</LinearLayout>
diff --git a/res/layout/history.xml b/res/layout/history.xml
index 53f70dc..705c32d 100644
--- a/res/layout/history.xml
+++ b/res/layout/history.xml
@@ -39,18 +39,34 @@
android:visibility="gone"
/>
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/combo_shadow_height"
+ android:layout_gravity="bottom"
+ android:background="@drawable/shadow_top" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/combo_shadow_height"
+ android:layout_gravity="top"
+ android:background="@drawable/shadow_bottom" />
+
</FrameLayout>
+
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="10"
- android:layout_alignParentBottom="true" >
+ android:background="@color/primary"
+ style="?android:attr/buttonBarStyle" >
<Button
android:id="@+id/clear_history_button"
android:text="@string/clear_history"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ style="?android:attr/buttonBarButtonStyle"
/>
</LinearLayout>
diff --git a/res/layout/snapshot_item.xml b/res/layout/snapshot_item.xml
index 7c7ba3b..94a9898 100644
--- a/res/layout/snapshot_item.xml
+++ b/res/layout/snapshot_item.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="@dimen/combo_horizontalSpacing">
+ android:padding="@dimen/combo_snapshot_item_padding">
<ImageView
android:id="@+id/thumb"
android:src="@drawable/thumbnail_bookmarks_widget_no_bookmark_holo"
@@ -49,12 +49,12 @@
android:layout_below="@+id/thumb"
android:layout_alignLeft="@+id/thumb"
android:layout_alignRight="@+id/thumb"
- android:layout_marginTop="6dip"
+ android:layout_marginTop="5dip"
android:paddingLeft="8dip"
android:gravity="center_vertical"
- android:typeface="sans"
+ android:textColor="@color/black"
android:textSize="12sp"
- android:textColor="#AAAAAA"
+ android:fontFamily="sans-serif-light"
android:lines="2" />
<ImageView
android:id="@+id/divider"
diff --git a/res/layout/snapshots.xml b/res/layout/snapshots.xml
index a02fbb9..045a418 100644
--- a/res/layout/snapshots.xml
+++ b/res/layout/snapshots.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="@dimen/combo_paddingTop">
+ android:paddingTop="@dimen/combo_snapshot_paddingTop">
<com.android.browser.view.SnapshotGridView
android:id="@+id/grid"
@@ -37,4 +37,10 @@
android:text="@string/empty_snapshots_folder"
android:visibility="gone" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/combo_shadow_height"
+ android:layout_gravity="top"
+ android:background="@drawable/shadow_bottom" />
+
</FrameLayout>