diff options
-rw-r--r-- | res/drawable-hdpi/ic_home.png | bin | 0 -> 3063 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_home.png | bin | 0 -> 610 bytes | |||
-rw-r--r-- | res/layout/bookmarks_header.xml | 12 | ||||
-rw-r--r-- | res/layout/bookmarks_history.xml | 41 | ||||
-rw-r--r-- | res/values/strings.xml | 8 | ||||
-rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 35 | ||||
-rw-r--r-- | src/com/android/browser/BreadCrumbView.java | 70 | ||||
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 115 | ||||
-rw-r--r-- | src/com/android/browser/CombinedBookmarkHistoryView.java | 30 | ||||
-rw-r--r-- | src/com/android/browser/ShortcutActivity.java | 8 |
10 files changed, 191 insertions, 128 deletions
diff --git a/res/drawable-hdpi/ic_home.png b/res/drawable-hdpi/ic_home.png Binary files differnew file mode 100644 index 0000000..2b5fd01 --- /dev/null +++ b/res/drawable-hdpi/ic_home.png diff --git a/res/drawable-mdpi/ic_home.png b/res/drawable-mdpi/ic_home.png Binary files differnew file mode 100644 index 0000000..df2dbc6 --- /dev/null +++ b/res/drawable-mdpi/ic_home.png diff --git a/res/layout/bookmarks_header.xml b/res/layout/bookmarks_header.xml index 05bfa32..5d83892 100644 --- a/res/layout/bookmarks_header.xml +++ b/res/layout/bookmarks_header.xml @@ -19,18 +19,6 @@ android:layout_height="48dip" android:orientation="horizontal"> - <TextView - android:id="@+id/root_folder" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:text="@string/defaultBookmarksUpButton" - android:textAppearance="?android:attr/textAppearanceMedium" - android:gravity="center_vertical" - android:visibility="gone" - android:paddingLeft="16dip" - android:drawableLeft="@drawable/ic_tab_bookmarks_selected" - android:drawablePadding="16dip" /> - <com.android.browser.BreadCrumbView android:id="@+id/crumbs" android:layout_width="0dip" diff --git a/res/layout/bookmarks_history.xml b/res/layout/bookmarks_history.xml index a3a5084..3294434 100644 --- a/res/layout/bookmarks_history.xml +++ b/res/layout/bookmarks_history.xml @@ -18,8 +18,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="8dip" - android:paddingLeft="16dip" - android:paddingRight="16dip" android:orientation="vertical" android:background="@color/black"> <LinearLayout @@ -29,33 +27,38 @@ <LinearLayout android:id="@+id/tabs" android:layout_width="wrap_content" - android:layout_height="match_parent"> + android:layout_height="match_parent" + style="@style/ActionBarStyle"> <TextView - android:id="@+id/historytab" + android:id="@+id/bmtab" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="32dip" android:paddingRight="32dip" android:textAppearance="?android:attr/textAppearanceMedium" android:gravity="center_vertical" - android:text="@string/tab_history" - android:drawableLeft="@drawable/ic_tab_history_selected" - android:drawablePadding="16dip" /> + android:text="@string/bookmarks" + android:drawableLeft="@drawable/ic_tab_bookmarks_selected" + android:drawablePadding="16dip" + android:background="@drawable/tab_background" /> <ImageView android:layout_width="wrap_content" android:layout_height="match_parent" + android:paddingTop="8dp" + android:paddingBottom="8dp" android:src="@drawable/divider_vert" /> <TextView - android:id="@+id/bmtab" + android:id="@+id/historytab" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="32dip" android:paddingRight="32dip" android:textAppearance="?android:attr/textAppearanceMedium" android:gravity="center_vertical" - android:text="@string/bookmarks" - android:drawableLeft="@drawable/ic_tab_bookmarks_selected" - android:drawablePadding="16dip" /> + android:text="@string/tab_history" + android:drawableLeft="@drawable/ic_tab_history_selected" + android:drawablePadding="16dip" + android:background="@drawable/tab_background" /> </LinearLayout> <FrameLayout @@ -83,6 +86,22 @@ android:drawableLeft="@drawable/ic_favorite_off_normal" android:drawablePadding="16dip" /> + <ImageView + android:id="@+id/seperate_select_add" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingLeft="16dip" + android:src="@drawable/divider_vert" /> + + <ImageView + android:id="@+id/home" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:src="@drawable/ic_home" + android:paddingRight="16dip" + android:paddingLeft="16dip" + android:scaleType="center" /> + </LinearLayout> <FrameLayout android:id="@+id/fragment" diff --git a/res/values/strings.xml b/res/values/strings.xml index ece6ffa..b1c04dc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -188,11 +188,11 @@ showing. --> <string name="bookmark_page">Bookmark last-viewed page</string> <!-- Menu item in the page that displays all bookmarks. Switches to - a grid view which shows thumbnails [CHAR LIMIT=50] --> - <string name="bookmark_thumbnail_view">Thumbnail view</string> + a grid view which shows thumbnails [CHAR LIMIT=20] --> + <string name="bookmark_thumbnail_view">Thumbnails</string> <!-- Menu item in the page that displays all bookmarks. Switches to a - list view which shows titles [CHAR LIMIT=50] --> - <string name="bookmark_list_view">List view</string> + list view which shows titles [CHAR LIMIT=20] --> + <string name="bookmark_list_view">List</string> <!-- Summary text under the New Bookmark item on the Bookmarks screen. Tells the user that if they select this item, it will bring up a dialog to bookmark the page that the browser is currently viewing, diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index de256a8..24a8cd5 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); diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java index d0ba8ad..e4940e9 100644 --- a/src/com/android/browser/BreadCrumbView.java +++ b/src/com/android/browser/BreadCrumbView.java @@ -47,6 +47,7 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { private List<Crumb> mCrumbs; private boolean mUseBackButton; private Drawable mSeparatorDrawable; + private int mMaxVisible = -1; /** * @param context @@ -80,22 +81,31 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { mCrumbs = new ArrayList<Crumb>(); mSeparatorDrawable = ctx.getResources().getDrawable( R.drawable.crumb_divider); + addBackButton(); } public void setUseBackButton(boolean useflag) { mUseBackButton = useflag; - if (mUseBackButton && (mBackButton == null)) { - addBackButton(); - } else if (!mUseBackButton && (mBackButton != null)) { - removeView(mBackButton); - mBackButton = null; - } + updateVisible(); } public void setController(Controller ctl) { mController = ctl; } + public int getMaxVisible() { + return mMaxVisible; + } + + public void setMaxVisible(int max) { + mMaxVisible = max; + updateVisible(); + } + + public int getTopLevel() { + return mCrumbs.size(); + } + public Object getTopData() { Crumb c = getTopCrumb(); if (c != null) { @@ -155,14 +165,12 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { } private void pushCrumb(Crumb crumb) { - if (!mUseBackButton || (mCrumbs.size() > 0)) { + if (mCrumbs.size() > 0) { addSeparator(); } mCrumbs.add(crumb); addView(crumb.crumbView); - if (mUseBackButton) { - mBackButton.setVisibility(crumb.canGoBack ? View.VISIBLE : View.INVISIBLE); - } + updateVisible(); crumb.crumbView.setOnClickListener(this); } @@ -191,12 +199,54 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { mBackButton.setVisibility(View.INVISIBLE); } } + updateVisible(); if (notify) { notifyController(); } } } + private void updateVisible() { + // start at index 1 (0 == back button) + int childIndex = 1; + if (mMaxVisible >= 0) { + int invisibleCrumbs = size() - mMaxVisible; + if (invisibleCrumbs > 0) { + int crumbIndex = 0; + while (crumbIndex < invisibleCrumbs) { + // Set the crumb to GONE. + getChildAt(childIndex).setVisibility(View.GONE); + childIndex++; + // Each crumb is followed by a separator (except the last + // one). Also make it GONE + if (getChildAt(childIndex) != null) { + getChildAt(childIndex).setVisibility(View.GONE); + } + childIndex++; + // Move to the next crumb. + crumbIndex++; + } + } + // Make sure the last two are visible. + int childCount = getChildCount(); + while (childIndex < childCount) { + getChildAt(childIndex).setVisibility(View.VISIBLE); + childIndex++; + } + } else { + int count = getChildCount(); + for (int i = childIndex; i < count ; i++) { + getChildAt(i).setVisibility(View.VISIBLE); + } + } + if (mUseBackButton) { + boolean canGoBack = getTopCrumb() != null ? getTopCrumb().canGoBack : false; + mBackButton.setVisibility(canGoBack ? View.VISIBLE : View.INVISIBLE); + } else { + mBackButton.setVisibility(View.GONE); + } + } + private void removeLastView() { int ix = getChildCount(); if (ix > 0) { diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java index 74385f9..13a0101 100644 --- a/src/com/android/browser/BrowserBookmarksPage.java +++ b/src/com/android/browser/BrowserBookmarksPage.java @@ -56,7 +56,6 @@ import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.GridView; import android.widget.ListView; -import android.widget.PopupMenu; import android.widget.PopupMenu.OnMenuItemClickListener; import android.widget.TextView; import android.widget.Toast; @@ -66,6 +65,7 @@ interface BookmarksPageCallbacks { boolean onBookmarkSelected(Cursor c, boolean isFolder); // Return true if handled boolean onOpenInNewWindow(Cursor c); + void onFolderChanged(int level, Uri uri); } /** @@ -103,10 +103,12 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte View mEmptyView; int mCurrentView; View mHeader; - View mRootFolderView; ViewGroup mHeaderContainer; BreadCrumbView mCrumbs; TextView mSelectBookmarkView; + int mCrumbVisibility = View.VISIBLE; + int mCrumbMaxVisible = -1; + boolean mCrumbBackButton = false; static BrowserBookmarksPage newInstance(BookmarksPageCallbacks cb, Bundle args, ViewGroup headerContainer) { @@ -242,20 +244,6 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte return -1; } - public void onFolderChange(int level, Object data) { - Uri uri = (Uri) data; - if (uri == null) { - // top level - uri = BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER; - } - LoaderManager manager = getLoaderManager(); - BookmarksLoader loader = - (BookmarksLoader) ((Loader<?>) manager.getLoader(LOADER_BOOKMARKS)); - loader.setUri(uri); - loader.forceLoad(); - - } - @Override public boolean onContextItemSelected(MenuItem item) { final Activity activity = getActivity(); @@ -420,11 +408,16 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte mHeader = inflater.inflate(R.layout.bookmarks_header, hc, true); mCrumbs = (BreadCrumbView) mHeader.findViewById(R.id.crumbs); mCrumbs.setController(this); + mCrumbs.setUseBackButton(mCrumbBackButton); + mCrumbs.setMaxVisible(mCrumbMaxVisible); + mCrumbs.setVisibility(mCrumbVisibility); + String name = getString(R.string.bookmarks); + mCrumbs.pushView(name, false, BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER); + if (mCallbacks != null) { + mCallbacks.onFolderChanged(1, BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER); + } mSelectBookmarkView = (TextView) mHeader.findViewById(R.id.select_bookmark_view); mSelectBookmarkView.setOnClickListener(this); - mRootFolderView = mHeader.findViewById(R.id.root_folder); - mRootFolderView.setOnClickListener(this); - setShowRootFolder(mShowRootFolder); // Start the loaders LoaderManager lm = getLoaderManager(); @@ -432,9 +425,9 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte mCurrentView = prefs.getInt(PREF_SELECTED_VIEW, BrowserBookmarksPage.VIEW_THUMBNAILS); if (mCurrentView == BrowserBookmarksPage.VIEW_THUMBNAILS) { - mSelectBookmarkView.setText(R.string.bookmark_thumbnail_view); - } else { mSelectBookmarkView.setText(R.string.bookmark_list_view); + } else { + mSelectBookmarkView.setText(R.string.bookmark_thumbnail_view); } mAdapter = new BrowserBookmarksAdapter(getActivity(), mCurrentView); String accountType = prefs.getString(PREF_ACCOUNT_TYPE, DEFAULT_ACCOUNT); @@ -459,17 +452,6 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte return root; } - public void setShowRootFolder(boolean show) { - mShowRootFolder = show; - if (mRootFolderView != null) { - if (mShowRootFolder) { - mRootFolderView.setVisibility(View.VISIBLE); - } else { - mRootFolderView.setVisibility(View.GONE); - } - } - } - @Override public void onDestroyView() { super.onDestroyView(); @@ -505,17 +487,13 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte if (isFolder) { String title = cursor.getString(BookmarksLoader.COLUMN_INDEX_TITLE); - LoaderManager manager = getLoaderManager(); - BookmarksLoader loader = - (BookmarksLoader) ((Loader<?>) manager.getLoader(LOADER_BOOKMARKS)); Uri uri = ContentUris.withAppendedId( BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER, id); if (mCrumbs != null) { // update crumbs mCrumbs.pushView(title, uri); } - loader.setUri(uri); - loader.forceLoad(); + loadFolder(uri); } } @@ -636,6 +614,11 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte return; } mCurrentView = view; + if (mCurrentView == BrowserBookmarksPage.VIEW_THUMBNAILS) { + mSelectBookmarkView.setText(R.string.bookmark_list_view); + } else { + mSelectBookmarkView.setText(R.string.bookmark_thumbnail_view); + } SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); Editor edit = prefs.edit(); edit.putInt(PREF_SELECTED_VIEW, mCurrentView); @@ -664,28 +647,39 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte } } - public BreadCrumbView getBreadCrumb() { - return mCrumbs; - } - /** * BreadCrumb controller callback */ @Override public void onTop(int level, Object data) { - onFolderChange(level, data); + Uri uri = (Uri) data; + if (uri == null) { + // top level + uri = BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER; + } + loadFolder(uri); + } + + /** + * @param uri + */ + private void loadFolder(Uri uri) { + LoaderManager manager = getLoaderManager(); + BookmarksLoader loader = + (BookmarksLoader) ((Loader<?>) manager.getLoader(LOADER_BOOKMARKS)); + loader.setUri(uri); + loader.forceLoad(); + if (mCallbacks != null) { + mCallbacks.onFolderChanged(mCrumbs.getTopLevel(), uri); + } } @Override public void onClick(View view) { if (mSelectBookmarkView == view) { - PopupMenu popup = new PopupMenu(getActivity(), mSelectBookmarkView); - popup.getMenuInflater().inflate(R.menu.bookmark_view, - popup.getMenu()); - popup.setOnMenuItemClickListener(this); - popup.show(); - } else if (mRootFolderView == view) { - mCrumbs.clear(); + selectView(mCurrentView == BrowserBookmarksPage.VIEW_LIST + ? BrowserBookmarksPage.VIEW_THUMBNAILS + : BrowserBookmarksPage.VIEW_LIST); } } @@ -693,11 +687,9 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { case R.id.list_view: - mSelectBookmarkView.setText(R.string.bookmark_list_view); selectView(BrowserBookmarksPage.VIEW_LIST); return true; case R.id.thumbnail_view: - mSelectBookmarkView.setText(R.string.bookmark_thumbnail_view); selectView(BrowserBookmarksPage.VIEW_THUMBNAILS); return true; } @@ -768,4 +760,25 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte } } } + + public void setBreadCrumbVisibility(int visibility) { + mCrumbVisibility = visibility; + if (mCrumbs != null) { + mCrumbs.setVisibility(mCrumbVisibility); + } + } + + public void setBreadCrumbUseBackButton(boolean use) { + mCrumbBackButton = use; + if (mCrumbs != null) { + mCrumbs.setUseBackButton(mCrumbBackButton); + } + } + + public void setBreadCrumbMaxVisible(int max) { + mCrumbMaxVisible = max; + if (mCrumbs != null) { + mCrumbs.setMaxVisible(mCrumbMaxVisible); + } + } } diff --git a/src/com/android/browser/CombinedBookmarkHistoryView.java b/src/com/android/browser/CombinedBookmarkHistoryView.java index 15f31f6..e63d126 100644 --- a/src/com/android/browser/CombinedBookmarkHistoryView.java +++ b/src/com/android/browser/CombinedBookmarkHistoryView.java @@ -24,6 +24,7 @@ import android.app.FragmentTransaction; import android.content.res.Resources; import android.database.Cursor; import android.graphics.Bitmap; +import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.provider.Browser; @@ -66,6 +67,7 @@ public class CombinedBookmarkHistoryView extends LinearLayout TextView mAddBookmark; View mSeperateSelectAdd; ViewGroup mBookmarksHeader; + View mHome; BrowserBookmarksPage mBookmarks; BrowserHistoryPage mHistory; @@ -125,9 +127,11 @@ public class CombinedBookmarkHistoryView extends LinearLayout mTabHistory = (TextView) findViewById(R.id.historytab); mAddBookmark = (TextView) findViewById(R.id.addbm); mSeperateSelectAdd = findViewById(R.id.seperate_select_add); + mHome = findViewById(R.id.home); mAddBookmark.setOnClickListener(this); mTabHistory.setOnClickListener(this); mTabBookmarks.setOnClickListener(this); + mHome.setOnClickListener(this); // Start up the default fragment initFragments(mExtras); loadFragment(startingFragment, mExtras, false); @@ -164,11 +168,25 @@ public class CombinedBookmarkHistoryView extends LinearLayout mUiController.onUrlSelected(BrowserBookmarksPage.getUrl(c), false); return true; } + + @Override + public void onFolderChanged(int level, Uri uri) { + // 1 is "bookmarks" root folder + if (level <= 1) { + mTabs.setVisibility(View.VISIBLE); + mBookmarks.setBreadCrumbVisibility(View.INVISIBLE); + } else { + mTabs.setVisibility(View.GONE); + mBookmarks.setBreadCrumbVisibility(View.VISIBLE); + } + } }; private void initFragments(Bundle extras) { mBookmarks = BrowserBookmarksPage.newInstance(mBookmarkCallbackWrapper, extras, mBookmarksHeader); + mBookmarks.setBreadCrumbMaxVisible(2); + mBookmarks.setBreadCrumbUseBackButton(true); mHistory = BrowserHistoryPage.newInstance(mUiController, extras); } @@ -180,11 +198,15 @@ public class CombinedBookmarkHistoryView extends LinearLayout fragment = mBookmarks; mSeperateSelectAdd.setVisibility(View.VISIBLE); mBookmarksHeader.setVisibility(View.VISIBLE); + mTabBookmarks.setActivated(true); + mTabHistory.setActivated(false); break; case FRAGMENT_ID_HISTORY: fragment = mHistory; mBookmarksHeader.setVisibility(View.INVISIBLE); mSeperateSelectAdd.setVisibility(View.INVISIBLE); + mTabBookmarks.setActivated(false); + mTabHistory.setActivated(true); break; default: throw new IllegalArgumentException(); @@ -217,14 +239,12 @@ public class CombinedBookmarkHistoryView extends LinearLayout } else if (mTabBookmarks == view) { if (mCurrentFragment != FRAGMENT_ID_BOOKMARKS) { loadFragment(FRAGMENT_ID_BOOKMARKS, mExtras, true); - } else { - BreadCrumbView crumbs = mBookmarks.getBreadCrumb(); - if (crumbs != null) { - crumbs.clear(); - } } } else if (mAddBookmark == view) { mUiController.bookmarkCurrentPage(mBookmarks.getFolderId()); + } else if (mHome == view) { + BrowserSettings settings = BrowserSettings.getInstance(); + mUiController.onUrlSelected(settings.getHomePage(), false); } } diff --git a/src/com/android/browser/ShortcutActivity.java b/src/com/android/browser/ShortcutActivity.java index 57cb4a7..786c6e1 100644 --- a/src/com/android/browser/ShortcutActivity.java +++ b/src/com/android/browser/ShortcutActivity.java @@ -19,6 +19,7 @@ package com.android.browser; import android.app.Activity; import android.content.Intent; import android.database.Cursor; +import android.net.Uri; import android.os.Bundle; public class ShortcutActivity extends Activity @@ -33,7 +34,8 @@ public class ShortcutActivity extends Activity setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); mBookmarks = BrowserBookmarksPage.newInstance(this, null, null); mBookmarks.setEnableContextMenu(false); - mBookmarks.setShowRootFolder(true); + mBookmarks.setBreadCrumbMaxVisible(2); + mBookmarks.setBreadCrumbUseBackButton(true); getFragmentManager() .openTransaction() .add(android.R.id.content, mBookmarks) @@ -64,4 +66,8 @@ public class ShortcutActivity extends Activity super.onBackPressed(); } } + + @Override + public void onFolderChanged(int level, Uri uri) { + } } |