Bug 837815 Reading list button opens Top Sites, not Reading List, r=wesj

This commit is contained in:
Mark Capella 2013-03-11 18:27:24 -04:00
parent e662fa3f8e
commit 3c0206eb79
2 changed files with 11 additions and 2 deletions

View File

@ -272,7 +272,7 @@ public class AwesomeBar extends GeckoActivity {
if (showReadingList) {
BookmarksTab bookmarksTab = mAwesomeTabs.getBookmarksTab();
bookmarksTab.setShowReadingList(true);
mAwesomeTabs.setCurrentTabByTag(bookmarksTab.getTag());
mAwesomeTabs.setCurrentItemByTag(bookmarksTab.getTag());
}
}

View File

@ -173,7 +173,7 @@ public class AwesomeBarTabs extends TabHost
styleSelectedTab();
// Initialize "App Pages" list with no filter
// Initialize "All Pages" list with no filter
filter("");
}
@ -199,6 +199,15 @@ public class AwesomeBarTabs extends TabHost
styleSelectedTab();
}
public void setCurrentItemByTag(String tag) {
for (int i = 0; i < mTabs.length; i++) {
if (tag.equals(mTabs[i].getTag())) {
mViewPager.setCurrentItem(i);
break;
}
}
}
private void styleSelectedTab() {
int selIndex = mViewPager.getCurrentItem();
TabWidget tabWidget = getTabWidget();