Example usage for android.content Intent CATEGORY_TAB

List of usage examples for android.content Intent CATEGORY_TAB

Introduction

In this page you can find the example usage for android.content Intent CATEGORY_TAB.

Prototype

String CATEGORY_TAB

To view the source code for android.content Intent CATEGORY_TAB.

Click Source Link

Document

Intended to be used as a tab inside of a containing TabActivity.

Usage

From source file:fr.mixit.android.ui.SpeakerDetailActivity.java

/** Build and add "presentations" tab. */
private void setupPresentationsTab() {
    final TabHost host = getTabHost();

    final Intent intent = new Intent(Intent.ACTION_VIEW, buildSessionsDirUri(mSpeakerId));
    intent.addCategory(Intent.CATEGORY_TAB);

    // Sessions content comes from reused activity
    host.addTab(host.newTabSpec(TAG_PRESENTATIONS).setIndicator(buildIndicator(R.string.speaker_sessions))
            .setContent(intent));/*from w ww . j  a v  a2s. co m*/
}

From source file:com.google.android.apps.iosched.ui.SessionDetailActivity.java

/** Build and add "notes" tab. */
private void setupNotesTab() {
    final TabHost host = getTabHost();

    final Uri notesUri = Sessions.buildNotesDirUri(mSessionId);
    final Intent intent = new Intent(Intent.ACTION_VIEW, notesUri);
    intent.addCategory(Intent.CATEGORY_TAB);
    intent.putExtra(NotesActivity.EXTRA_SHOW_INSERT, true);

    // Notes content comes from reused activity
    host.addTab(/*from  w w  w.  j  a  v  a 2 s.co m*/
            host.newTabSpec(TAG_NOTES).setIndicator(buildIndicator(R.string.session_notes)).setContent(intent));
}

From source file:fr.mixit.android.ui.StarredActivity.java

/** Build and add "sessions" tab. */
private void setupSessionsTab() {
    final TabHost host = getTabHost();

    final Uri uri = MixItContract.Sessions.CONTENT_STARRED_URI.buildUpon()
            .appendQueryParameter(MixItContract.SessionCounts.SESSION_INDEX_EXTRAS, Boolean.TRUE.toString())
            .build();/*from  www .  j a  v a  2s  .c  o  m*/
    final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    intent.addCategory(Intent.CATEGORY_TAB);
    final boolean highlightParalleStarred = settingsPrefs
            .getBoolean(getString(R.string.visualize_parallel_starred_sessions_key), false);
    intent.putExtra(SessionsActivity.EXTRA_HIHGLIGHT_PARALLEL_STARRED, highlightParalleStarred);
    intent.putExtra(SessionsActivity.EXTRA_FOCUS_CURRENT_NEXT_SESSION, true);

    // Sessions content comes from reused activity
    host.addTab(host.newTabSpec(TAG_SESSIONS).setIndicator(buildIndicator(R.string.starred_sessions))
            .setContent(intent));
}

From source file:fr.mixit.android.ui.StarredActivity.java

/** Build and add "speakers" tab. */
private void setupSpeakersTab() {
    final TabHost host = getTabHost();

    final Intent intent = new Intent(Intent.ACTION_VIEW, MixItContract.Speakers.CONTENT_STARRED_URI);
    intent.addCategory(Intent.CATEGORY_TAB);

    // Speakers content comes from reused activity
    host.addTab(host.newTabSpec(TAG_SPEAKERS).setIndicator(buildIndicator(R.string.starred_speakers))
            .setContent(intent));//  ww  w.j a  v a  2s . co  m
}