Updates for the look of the bookmarks page.
Add new assets.
-tab_indicator.xml
State selector for the background of tabs in the CombinedHistoryActivity
-bookmark_thumnail.xml
Web page title is now above the thumb. Removed the favicon. Added a
shadow.
-tab_header.xml
Layout for the tabs in CombinedHistoryActivity
-tabs.xml
Change the height of the tabs.
-bookmarks.xml
Remove the title for the "switch" menu item, which gets set in Java,
depending on the current viewing mode.
-strings.xml
Remove the placeholder menu item text, add the actual text for
switching between modes.
-BrowserBookmarksAdapter
No longer set the favicon on top of the bookmark thumbs in grid mode.
-BrowserBookmarksPage
Implement onPrepareOptionsMenu, and set the title of a menu option,
depending on the current viewing state.
-CombinedHistoryActivity
Create a common function for setting up all the tabs. Change the
look of the tabs to match the new design.
diff --git a/res/layout/bookmark_thumbnail.xml b/res/layout/bookmark_thumbnail.xml
index c1e0cd2..b3d39a4 100644
--- a/res/layout/bookmark_thumbnail.xml
+++ b/res/layout/bookmark_thumbnail.xml
@@ -20,21 +20,36 @@
android:padding="4dip"
>
+ <!-- Keep the width in sync with BrowserBookmarksPage and
+ BrowserActivity.updateScreenshot -->
+ <TextView android:id="@+id/label"
+ android:layout_width="100dip"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold"
+ android:textColor="@color/white"
+ android:maxLines="1"
+ android:paddingTop="3dip"
+ android:paddingBottom="3dip"
+ android:paddingLeft="2dip"
+ android:paddingRight="2dip"
+ android:scrollHorizontally="true"
+ android:ellipsize="marquee"
+ />
+
<ImageView android:id="@+id/thumb"
android:src="@drawable/blank"
android:scaleType="center"
android:layout_width="100dip"
android:layout_height="80dip"
+ android:background="@drawable/bookmark_shadow"
+ android:layout_below="@+id/label"
/>
- <ImageView android:id="@+id/fav"
- android:scaleType="fitCenter"
- android:layout_width="20dip"
- android:layout_height="20dip"
- android:padding="2dip"
- android:layout_alignBottom="@+id/thumb"
- android:background="@drawable/fav_icn_background"
- />
+ <!-- FIXME: Want to have a gradient over the thumb -->
+
+ <!-- This holds the star for addbookmark -->
<LinearLayout android:id="@+id/holder"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
@@ -59,22 +74,4 @@
android:text="@string/add_bookmark_short"
/>
</LinearLayout>
- <!-- Keep the width in sync with BrowserBookmarksPage and
- BrowserActivity.updateScreenshot -->
- <TextView android:id="@+id/label"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:layout_below="@+id/thumb"
- android:layout_gravity="bottom"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold"
- android:textColor="@color/white"
- android:maxLines="1"
- android:paddingTop="3dip"
- android:paddingBottom="3dip"
- android:paddingLeft="2dip"
- android:paddingRight="2dip"
- android:scrollHorizontally="true"
- android:ellipsize="marquee"
- />
</RelativeLayout>
diff --git a/res/layout/tab_header.xml b/res/layout/tab_header.xml
new file mode 100644
index 0000000..7187034
--- /dev/null
+++ b/res/layout/tab_header.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/tab_indicator"
+ >
+ <TextView
+ android:id="@+id/tab_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorPrimary"
+ android:layout_gravity="center"
+ />
+</FrameLayout>
diff --git a/res/layout/tabs.xml b/res/layout/tabs.xml
index 7cf5b5d..4fa102b 100644
--- a/res/layout/tabs.xml
+++ b/res/layout/tabs.xml
@@ -26,7 +26,7 @@
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
- android:layout_height="68dip"
+ android:layout_height="wrap_content"
android:paddingLeft="1dip"
android:paddingRight="1dip"
android:paddingTop="4dip"