FileDocCategorySizeDatePackage
CombinedBookmarkHistoryActivity.javaAPI DocAndroid 1.5 API4744Wed May 06 22:42:42 BST 2009com.android.browser

CombinedBookmarkHistoryActivity

public class CombinedBookmarkHistoryActivity extends android.app.TabActivity implements TabHost.OnTabChangeListener

Fields Summary
static String
BOOKMARKS_TAB
static String
VISITED_TAB
static String
HISTORY_TAB
static String
STARTING_TAB
private static IconListenerSet
sIconListenerSet
Constructors Summary
Methods Summary
static com.android.browser.CombinedBookmarkHistoryActivity$IconListenerSetgetIconListenerSet(android.content.ContentResolver cr)

        if (null == sIconListenerSet) {
            sIconListenerSet = new IconListenerSet();
            Browser.requestAllIcons(cr, null, sIconListenerSet);
        }
        return sIconListenerSet;
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.tabs);
        TabHost tabHost = getTabHost();
        tabHost.setOnTabChangedListener(this);

        Bundle extras = getIntent().getExtras();
        Resources resources = getResources();

        getIconListenerSet(getContentResolver());
        Intent bookmarksIntent = new Intent(this, BrowserBookmarksPage.class);
        bookmarksIntent.putExtras(extras);
        tabHost.addTab(tabHost.newTabSpec(BOOKMARKS_TAB)
                .setIndicator(resources.getString(R.string.tab_bookmarks),
                resources.getDrawable(R.drawable.browser_bookmark_tab))
                .setContent(bookmarksIntent));

        Intent visitedIntent = new Intent(this, MostVisitedActivity.class);
        visitedIntent.putExtras(extras);
        tabHost.addTab(tabHost.newTabSpec(VISITED_TAB)
                .setIndicator(resources.getString(R.string.tab_most_visited),
                resources.getDrawable(R.drawable.browser_visited_tab))
                .setContent(visitedIntent));

        Intent historyIntent = new Intent(this, BrowserHistoryPage.class);
        historyIntent.putExtras(extras);
        tabHost.addTab(tabHost.newTabSpec(HISTORY_TAB)
                .setIndicator(resources.getString(R.string.tab_history),
                resources.getDrawable(R.drawable.
                browser_history_tab)).setContent(historyIntent));

        String defaultTab = extras.getString(STARTING_TAB);
        if (defaultTab != null) {
            tabHost.setCurrentTab(2);
        }
    
public voidonTabChanged(java.lang.String tabId)
{@inheritDoc}

        Activity activity = getLocalActivityManager().getActivity(tabId);
        if (activity != null) {
            activity.onWindowFocusChanged(true);
        }