本文整理匯總了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);
}