本文整理了Java中android.os.Bundle.putLong()
方法的一些代码示例,展示了Bundle.putLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putLong()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putLong
暂无
代码示例来源:origin: androidannotations/androidannotations
public I arg(String key, long value) {
args.putLong(key, value);
return (I) this;
}
代码示例来源:origin: stackoverflow.com
protected void onSaveInstanceState(Bundle icicle) {
super.onSaveInstanceState(icicle);
icicle.putLong("param", value);
}
代码示例来源:origin: ogaclejapan/SmartTabLayout
/**
* Inserts a long value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a long
*/
public Bundler putLong(String key, long value) {
bundle.putLong(key, value);
return this;
}
代码示例来源:origin: ogaclejapan/SmartTabLayout
/**
* Inserts a long value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a long
*/
public Bundler putLong(String key, long value) {
bundle.putLong(key, value);
return this;
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
protected void populateRequestBundle(Bundle data) {
data.putString(NativeProtocol.EXTRA_LOGGER_REF, loggerRef);
data.putString(NativeProtocol.EXTRA_GRAPH_API_VERSION, graphApiVersion);
data.putLong(NativeProtocol.EXTRA_TOAST_DURATION_MS, toastDurationMs);
}
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public Bundle getParameters() {
Bundle parameters = new Bundle();
parameters.putString(PARAM_UPLOAD_PHASE, PARAM_VALUE_UPLOAD_START_PHASE);
parameters.putLong(PARAM_FILE_SIZE, uploadContext.videoSize);
return parameters;
}
代码示例来源:origin: aa112901/remusic
@Override
public void writeToParcel(Parcel dest, int flags) {
Bundle bundle = new Bundle();
bundle.putString(KEY_ARTIST_NAME, artist_name);
bundle.putInt(KEY_NUMBER_OF_TRACKS, number_of_tracks);
bundle.putLong(KEY_ARTIST_ID, artist_id);
bundle.putString(KEY_ARTIST_SORT, artist_sort);
dest.writeBundle(bundle);
}
代码示例来源:origin: naman14/Timber
public static AlbumDetailFragment newInstance(long id, boolean useTransition, String transitionName) {
AlbumDetailFragment fragment = new AlbumDetailFragment();
Bundle args = new Bundle();
args.putLong(Constants.ALBUM_ID, id);
args.putBoolean("transition", useTransition);
if (useTransition)
args.putString("transition_name", transitionName);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: naman14/Timber
public static ArtistDetailFragment newInstance(long id, boolean useTransition, String transitionName) {
ArtistDetailFragment fragment = new ArtistDetailFragment();
Bundle args = new Bundle();
args.putLong(Constants.ARTIST_ID, id);
args.putBoolean("transition", useTransition);
if (useTransition)
args.putString("transition_name", transitionName);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: aa112901/remusic
public static AlbumDetailFragment newInstance(long id, boolean useTransition, String transitionName) {
AlbumDetailFragment fragment = new AlbumDetailFragment();
Bundle args = new Bundle();
args.putLong("album_id", id);
args.putBoolean("transition", useTransition);
if (useTransition)
args.putString("transition_name", transitionName);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: naman14/Timber
public static ArtistBioFragment newInstance(long id) {
ArtistBioFragment fragment = new ArtistBioFragment();
Bundle args = new Bundle();
args.putLong(Constants.ARTIST_ID, id);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: naman14/Timber
public static SimilarArtistFragment newInstance(long id) {
SimilarArtistFragment fragment = new SimilarArtistFragment();
Bundle args = new Bundle();
args.putLong(Constants.ARTIST_ID, id);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: naman14/Timber
public static ArtistMusicFragment newInstance(long id) {
ArtistMusicFragment fragment = new ArtistMusicFragment();
Bundle args = new Bundle();
args.putLong(Constants.ARTIST_ID, id);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: aa112901/remusic
public static SimpleMoreFragment newInstance(long id) {
SimpleMoreFragment fragment = new SimpleMoreFragment();
Bundle args = new Bundle();
args.putLong("id", id);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: square/sqlbrite
public static ItemsFragment newInstance(long listId) {
Bundle arguments = new Bundle();
arguments.putLong(KEY_LIST_ID, listId);
ItemsFragment fragment = new ItemsFragment();
fragment.setArguments(arguments);
return fragment;
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putLong(STATE_CREATION_TIME, getCreationTime());
dumpBundleToLog("save", outState);
Log.d(getClass().getSimpleName(), "onSaveInstanceState() called");
}
代码示例来源:origin: facebook/facebook-android-sdk
protected void logWebLoginCompleted(String e2e) {
String applicationId = loginClient.getPendingRequest().getApplicationId();
AppEventsLogger appEventsLogger =
AppEventsLogger.newLogger(loginClient.getActivity(), applicationId);
Bundle parameters = new Bundle();
parameters.putString(AnalyticsEvents.PARAMETER_WEB_LOGIN_E2E, e2e);
parameters.putLong(
AnalyticsEvents.PARAMETER_WEB_LOGIN_SWITCHBACK_TIME, System.currentTimeMillis());
parameters.putString(AnalyticsEvents.PARAMETER_APP_ID, applicationId);
appEventsLogger.logSdkEvent(AnalyticsEvents.EVENT_WEB_LOGIN_COMPLETE, null, parameters);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putLong(STATE_CREATION_TIME, getCreationTime());
dumpBundleToLog("save", outState);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldValidateSyncExtras() {
Bundle bundle = new Bundle();
bundle.putString("foo", "strings");
bundle.putLong("long", 10L);
bundle.putDouble("double", 10.0d);
bundle.putFloat("float", 10.0f);
bundle.putInt("int", 10);
bundle.putParcelable("account", a);
ContentResolver.validateSyncExtrasBundle(bundle);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void getLong() {
bundle.putLong("foo", 5);
assertThat(bundle.getLong("foo")).isEqualTo(5);
assertThat(bundle.getLong("bar")).isEqualTo(0);
assertThat(bundle.getLong("bar", 7)).isEqualTo(7);
}
内容来源于网络,如有侵权,请联系作者删除!