From 89f73c1146f474641881e3e20c77cfbfc18fa313 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 1 Dec 2010 10:10:14 -0800 Subject: Bookmarks page UI updates Bug: 3248628 Updates the bookmark page UI based off of the newest UI design document. Change-Id: I26447b7e1c38798b3c229c9d8c10af2565458a7b --- src/com/android/browser/AddBookmarkPage.java | 35 +--------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'src/com/android/browser/AddBookmarkPage.java') 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); -- cgit v1.2.3