android.os.Bundle.putShortArray()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中android.os.Bundle.putShortArray()方法的一些代码示例,展示了Bundle.putShortArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putShortArray()方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putShortArray

Bundle.putShortArray介绍

暂无

代码示例

代码示例来源:origin: androidannotations/androidannotations

public I arg(String key, short[] value) {
  args.putShortArray(key, value);
  return (I) this;
}

代码示例来源:origin: ogaclejapan/SmartTabLayout

/**
 * Inserts a short array value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a short array object, or null
 */
public Bundler putShortArray(String key, short[] value) {
 bundle.putShortArray(key, value);
 return this;
}

代码示例来源:origin: ogaclejapan/SmartTabLayout

/**
 * Inserts a short array value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a short array object, or null
 */
public Bundler putShortArray(String key, short[] value) {
 bundle.putShortArray(key, value);
 return this;
}

代码示例来源:origin: f2prateek/dart

/**
 * Inserts a short array value into the mapping of the underlying Bundle, replacing any existing
 * value for the given key. Either key or value may be null.
 *
 * @param key a String, or null
 * @param value a short array object, or null
 * @return this bundler instance to chain method calls
 */
public Bundler put(String key, short[] value) {
 delegate.putShortArray(key, value);
 return this;
}

代码示例来源:origin: bluelinelabs/Conductor

public BundleBuilder putShortArray(String key, short[] value) {
  bundle.putShortArray(key, value);
  return this;
}

代码示例来源:origin: facebook/facebook-android-sdk

private static void putShortArray(String key, Bundle bundle) {
  int length = random.nextInt(50);
  short[] array = new short[length];
  for (int i = 0; i < length; i++) {
    array[i] = (short)random.nextInt();
  }
  bundle.putShortArray(key, array);
}

代码示例来源:origin: facebook/facebook-android-sdk

array[i] = (short)jsonArray.getInt(i);
  bundle.putShortArray(key, array);
} else if (valueType.equals(TYPE_INTEGER)) {
  bundle.putInt(key, json.getInt(JSON_VALUE));

代码示例来源:origin: konmik/nucleus

when(bundle.getByteArray(anyString())).thenAnswer(get);
doAnswer(put).when(bundle).putShortArray(anyString(), any(short[].class));
when(bundle.getShortArray(anyString())).thenAnswer(get);

代码示例来源:origin: robolectric/robolectric

@Test
public void shortArray() {
 short [] arr = new short[] { 89, 37 };
 bundle.putShortArray("foo", arr);
 assertThat(bundle.getShortArray("foo")).isEqualTo(arr);
 assertThat(bundle.getShortArray("bar")).isNull();
}

代码示例来源:origin: facebook/facebook-android-sdk

@LargeTest
  public void testCantUseComplexParameterInGetRequest() {
    Bundle parameters = new Bundle();
    parameters.putShortArray("foo", new short[1]);

    GraphRequest request = new GraphRequest(
        AccessToken.getCurrentAccessToken(),
        "me",
        parameters,
        HttpMethod.GET,
        new ExpectFailureCallback());
    GraphResponse response = request.executeAndWait();

    FacebookRequestError error = response.getError();
    assertNotNull(error);
    FacebookException exception = error.getException();
    assertNotNull(exception);
    assertTrue(exception.getMessage().contains("short[]"));
  }
}

代码示例来源:origin: meituan/WMRouter

/**
 * 附加到Intent的Extra
 */
public DefaultUriRequest putExtra(String name, short[] value) {
  extra().putShortArray(name, value);
  return this;
}

代码示例来源:origin: evernote/android-state

public void putShortArray(Bundle state, String key, short[] x) {
  state.putShortArray(key + mBaseKey, x);
}

代码示例来源:origin: com.codeslap/groundy

/**
 * Inserts a short array value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a short array object, or null
 */
public Bundler add(String key, short[] value) {
  mBundle.putShortArray(key, value);
  return this;
}

代码示例来源:origin: 80945540/LCRapidDevelop

/**
 * Inserts a short array value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a short array object, or null
 */
public Bundler putShortArray(String key, short[] value) {
 bundle.putShortArray(key, value);
 return this;
}

代码示例来源:origin: 80945540/FreeBook

/**
 * Inserts a short array value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a short array object, or null
 */
public Bundler putShortArray(String key, short[] value) {
 bundle.putShortArray(key, value);
 return this;
}

代码示例来源:origin: LuckyJayce/EventBus-Apt

@Override
  public void put(Bundle bundle, String paramName, Object arg) {
    bundle.putShortArray(paramName, (short[]) arg);
  }
});

代码示例来源:origin: com.github.stephanenicolas.dart.v2/henson

/**
 * Inserts a short array value into the mapping of the underlying Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key a String, or null
 * @param value a short array object, or null
 * @return this bundler instance to chain method calls
 */
public Bundler put(String key, short[] value) {
 delegate.putShortArray(key, value);
 return this;
}

代码示例来源:origin: xiaoxiaogogo/Qiaoba

public Builder withShortArray(String key, short[] val){
  if(mArgBundle == null){
    mArgBundle = new Bundle();
  }
  mArgBundle.putShortArray(key, val);
  return this;
}

代码示例来源:origin: xiaoxiaogogo/Qiaoba

public Builder withShortArray(String key, short[] val){
  if(mArgBundle == null){
    mArgBundle = new Bundle();
  }
  mArgBundle.putShortArray(key, val);
  return this;
}

代码示例来源:origin: gkasten/drrickorang

@Override
public void writeToParcel(Parcel dest, int flags) {
  Bundle out = new Bundle();
  out.putIntArray("mTimeStamps", mTimeStamps);
  out.putShortArray("mCallbackDurations", mCallbackDurations);
  out.putShort("mExpectedBufferPeriod", mExpectedBufferPeriod);
  out.putBoolean("mExceededCapacity", mExceededCapacity);
  out.putInt("mIndex", mIndex);
  dest.writeBundle(out);
}

相关文章

Bundle类方法