summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKulanthaivel Palanichamy <kulanthaivel@codeaurora.org>2015-02-09 11:27:14 -0800
committerWebTech Code Review <code-review@localhost>2015-02-10 15:28:43 -0800
commit9e4211cafce59a6cb5c4ba56c6663af0490a5be5 (patch)
treed286710cb4b1a76c967ddaae17468f25d71cb161
parentc0cada0ce3e50c835dedba9c64db733e0b0a7109 (diff)
downloadandroid_packages_apps_Gello-9e4211cafce59a6cb5c4ba56c6663af0490a5be5.tar.gz
android_packages_apps_Gello-9e4211cafce59a6cb5c4ba56c6663af0490a5be5.tar.bz2
android_packages_apps_Gello-9e4211cafce59a6cb5c4ba56c6663af0490a5be5.zip
Revert(partial): 'Cleanup Bookmarks, History, and SavedPages screen'
Reverts a part of the previous patch that hides the group view if there is only one view. Apparently the group view in Bookmarks screen is used for other purposes. This patch also contains some text appearance changes to match the existing changes. Change-Id: I4432d662a6450221aff5c391ce4f680bff747e11
-rw-r--r--res/layout/bookmark_group_view.xml3
-rw-r--r--res/layout/bookmark_thumbnail.xml4
-rw-r--r--res/values/styles.xml6
-rw-r--r--src/com/android/browser/BreadCrumbView.java2
-rw-r--r--src/com/android/browser/view/BookmarkExpandableView.java10
5 files changed, 10 insertions, 15 deletions
diff --git a/res/layout/bookmark_group_view.xml b/res/layout/bookmark_group_view.xml
index e6c9628c..cf4498e7 100644
--- a/res/layout/bookmark_group_view.xml
+++ b/res/layout/bookmark_group_view.xml
@@ -17,7 +17,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
+ android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:orientation="horizontal"
android:background="?android:attr/listChoiceBackgroundIndicator">
@@ -26,6 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="50dp"
+ android:textAppearance="@style/BookmarkText"
android:gravity="center_vertical" />
<FrameLayout
diff --git a/res/layout/bookmark_thumbnail.xml b/res/layout/bookmark_thumbnail.xml
index 04d75c2d..64a0c9e4 100644
--- a/res/layout/bookmark_thumbnail.xml
+++ b/res/layout/bookmark_thumbnail.xml
@@ -44,9 +44,7 @@
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:singleLine="true"
- android:textColor="@color/black"
- android:textSize="16sp"
- android:fontFamily="sans-serif-light"
+ android:textAppearance="@style/BookmarkText"
/>
</com.android.browser.view.BookmarkContainer>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index ec0f34c0..88318a0b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -63,6 +63,12 @@
<item name="android:windowIsTranslucent">true</item>
</style>
+ <style name="BookmarkText">
+ <item name="android:textSize">16sp</item>
+ <item name="android:textColor">@color/black</item>
+ <item name="android:fontFamily">sans-serif-light</item>
+ </style>
+
<style name="ShortcutTheme" parent="@style/BrowserBase">
</style>
diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java
index f6bee4a9..0cd82263 100644
--- a/src/com/android/browser/BreadCrumbView.java
+++ b/src/com/android/browser/BreadCrumbView.java
@@ -397,7 +397,7 @@ public class BreadCrumbView extends RelativeLayout implements OnClickListener {
private TextView makeCrumbView(String name) {
TextView tv = new TextView(mContext);
- tv.setTextAppearance(mContext, android.R.style.TextAppearance_Medium);
+ tv.setTextAppearance(mContext, R.style.BookmarkText);
tv.setPadding(mCrumbPadding, 0, mCrumbPadding, 0);
tv.setGravity(Gravity.CENTER_VERTICAL);
tv.setText(name);
diff --git a/src/com/android/browser/view/BookmarkExpandableView.java b/src/com/android/browser/view/BookmarkExpandableView.java
index db19c339..5e685656 100644
--- a/src/com/android/browser/view/BookmarkExpandableView.java
+++ b/src/com/android/browser/view/BookmarkExpandableView.java
@@ -403,16 +403,6 @@ public class BookmarkExpandableView extends ExpandableListView
if (view == null) {
view = mInflater.inflate(R.layout.bookmark_group_view, parent, false);
view.setOnClickListener(mGroupOnClickListener);
- if (getGroupCount() == 1 && isExpanded) {
- // Hide the group view if we have only one group in this expandable list.
- ViewGroup.LayoutParams lp = view.getLayoutParams();
- lp.height = 0;
- view.setLayoutParams(lp);
- view.setVisibility(View.INVISIBLE);
- if (parent instanceof ExpandableListView) {
- ((ExpandableListView) parent).setGroupIndicator(null);
- }
- }
}
view.setTag(R.id.group_position, groupPosition);
FrameLayout crumbHolder = (FrameLayout) view.findViewById(R.id.crumb_holder);