本文整理汇总了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);
}
示例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);
}
示例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);
}