summaryrefslogtreecommitdiff
path: root/src/com/android/browser/AddBookmarkPage.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-12-01 10:10:14 -0800
committerJohn Reck <jreck@google.com>2010-12-03 12:51:29 -0800
commit89f73c1146f474641881e3e20c77cfbfc18fa313 (patch)
tree6e5f3a932358d64c58bd065683a3f6ecc5cb2b31 /src/com/android/browser/AddBookmarkPage.java
parentc2f83b3d2c9c2e086b17ffecd8fbeb031ff04f06 (diff)
downloadBrowser-89f73c1146f474641881e3e20c77cfbfc18fa313.tar.gz
Bookmarks page UI updates
Bug: 3248628 Updates the bookmark page UI based off of the newest UI design document. Change-Id: I26447b7e1c38798b3c229c9d8c10af2565458a7b
Diffstat (limited to 'src/com/android/browser/AddBookmarkPage.java')
-rw-r--r--src/com/android/browser/AddBookmarkPage.java35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index de256a83..24a8cd5f 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -140,44 +140,11 @@ public class AddBookmarkPage extends Activity
LOADER_ID_FOLDER_CONTENTS));
loader.setUri(uri);
loader.forceLoad();
- updateVisible();
if (mFolderNamer.getVisibility() == View.VISIBLE) {
completeOrCancelFolderNaming(true);
}
}
- /**
- * Update the views shown to only show the two deepest levels of crumbs.
- * Note that this method depends on internal knowledge of BreadCrumbView.
- */
- private void updateVisible() {
- if (MAX_CRUMBS_SHOWN > 0) {
- int invisibleCrumbs = mCrumbs.size() - MAX_CRUMBS_SHOWN;
- // This class always uses a back button, which is the first child.
- int childIndex = 1;
- if (invisibleCrumbs > 0) {
- int crumbIndex = 0;
- while (crumbIndex < invisibleCrumbs) {
- // Set the crumb to GONE.
- mCrumbs.getChildAt(childIndex).setVisibility(View.GONE);
- childIndex++;
- // Each crumb is followed by a separator (except the last
- // one). Also make it GONE
- mCrumbs.getChildAt(childIndex).setVisibility(View.GONE);
- childIndex++;
- // Move to the next crumb.
- crumbIndex++;
- }
- }
- // Make sure the last two are visible.
- int childCount = mCrumbs.getChildCount();
- while (childIndex < childCount) {
- mCrumbs.getChildAt(childIndex).setVisibility(View.VISIBLE);
- childIndex++;
- }
- }
- }
-
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (v == mFolderNamer) {
@@ -428,7 +395,6 @@ public class AddBookmarkPage extends Activity
mCrumbs.pushView(thisFolder.Name, thisFolder);
}
getLoaderManager().stopLoader(LOADER_ID_ALL_FOLDERS);
- updateVisible();
break;
default:
break;
@@ -566,6 +532,7 @@ public class AddBookmarkPage extends Activity
mCrumbs.pushView(name, false,
new Folder(name, BrowserProvider2.FIXED_ID_ROOT));
mCrumbHolder = findViewById(R.id.crumb_holder);
+ mCrumbs.setMaxVisible(MAX_CRUMBS_SHOWN);
mAdapter = new FolderAdapter(this);
mListView = (ListView) findViewById(R.id.list);