當前位置: 首頁>>代碼示例>>Java>>正文


Java SherlockFragmentActivity.startActivity方法代碼示例

本文整理匯總了Java中com.actionbarsherlock.app.SherlockFragmentActivity.startActivity方法的典型用法代碼示例。如果您正苦於以下問題:Java SherlockFragmentActivity.startActivity方法的具體用法?Java SherlockFragmentActivity.startActivity怎麽用?Java SherlockFragmentActivity.startActivity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.actionbarsherlock.app.SherlockFragmentActivity的用法示例。


在下文中一共展示了SherlockFragmentActivity.startActivity方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: openAlbumProfile

import com.actionbarsherlock.app.SherlockFragmentActivity; //導入方法依賴的package包/類
/**
 * Opens the profile of an album.
 * 
 * @param context The {@link SherlockFragmentActivity} to use.
 * @param albumName The name of the album
 * @param artistName The name of the album artist
 */
public static void openAlbumProfile(final SherlockFragmentActivity context,
        final String albumName, final String artistName) {

    // Create a new bundle to transfer the album info
    final Bundle bundle = new Bundle();
    bundle.putString(Config.ALBUM_YEAR, MusicUtils.getReleaseDateForAlbum(context, albumName));
    bundle.putString(Config.ARTIST_NAME, artistName);
    bundle.putString(Config.MIME_TYPE, MediaStore.Audio.Albums.CONTENT_TYPE);
    bundle.putLong(Config.ID, MusicUtils.getIdForAlbum(context, albumName));
    bundle.putString(Config.NAME, albumName);

    // Create the intent to launch the profile activity
    final Intent intent = new Intent(context, ProfileActivity.class);
    intent.putExtras(bundle);
    context.startActivity(intent);
}
 
開發者ID:micromacer,項目名稱:Player-by-TweekProject,代碼行數:24,代碼來源:NavUtils.java

示例2: openArtistProfile

import com.actionbarsherlock.app.SherlockFragmentActivity; //導入方法依賴的package包/類
/**
 * Opens the profile of an artist.
 * 
 * @param context The {@link SherlockFragmentActivity} to use.
 * @param artistName The name of the artist
 */
public static void openArtistProfile(final SherlockFragmentActivity context,
        final String artistName) {

    // Create a new bundle to transfer the artist info
    final Bundle bundle = new Bundle();
    bundle.putLong(Config.ID, MusicUtils.getIdForArtist(context, artistName));
    bundle.putString(Config.MIME_TYPE, MediaStore.Audio.Artists.CONTENT_TYPE);
    bundle.putString(Config.ARTIST_NAME, artistName);

    // Create the intent to launch the profile activity
    final Intent intent = new Intent(context, ProfileActivity.class);
    intent.putExtras(bundle);
    context.startActivity(intent);
}
 
開發者ID:micromacer,項目名稱:Player-by-TweekProject,代碼行數:21,代碼來源:NavUtils.java

示例3: openSettings

import com.actionbarsherlock.app.SherlockFragmentActivity; //導入方法依賴的package包/類
/**
 * Opens to {@link SettingsActivity}.
 * 
 * @param activity The {@link SherlockFragmentActivity} to use.
 */
public static void openSettings(final SherlockFragmentActivity activity) {
    final Intent intent = new Intent(activity, SettingsActivity.class);
    activity.startActivity(intent);
}
 
開發者ID:micromacer,項目名稱:Player-by-TweekProject,代碼行數:10,代碼來源:NavUtils.java


注:本文中的com.actionbarsherlock.app.SherlockFragmentActivity.startActivity方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。