当前位置: 首页>>代码示例>>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;未经允许,请勿转载。