Bundle putIntArray - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Bundle putIntArray method.

This code example shows how to use the following methods:getIntArray, putIntArray
  } 
 
  @Test 
  public void testIntArray() { 
    int [] arr = new int[] { 87, 65 };
    bundle.putIntArray("foo", arr);
 
    Assert.assertArrayEquals(arr, bundle.getIntArray("foo"));
    assertNull(bundle.getIntArray("bar"));
  } 
 
  @Test 
  public void testLongArray() { 
    long [] arr = new long[] { 23, 11 };
    bundle.putLongArray("foo", arr);
 
    Assert.assertArrayEquals(arr, bundle.getLongArray("foo"));
    assertNull(bundle.getLongArray("bar"));
  } 
 
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getIntArray, putIntArray
    } 
 
    @Test 
    public void testIntArray() { 
        int [] arr = new int[] { 87, 65 };
        bundle.putIntArray("foo", arr);
 
        Assert.assertArrayEquals(arr, bundle.getIntArray("foo"));
        assertNull(bundle.getIntArray("bar"));
    } 
 
    @Test 
    public void testLongArray() { 
        long [] arr = new long[] { 23, 11 };
        bundle.putLongArray("foo", arr);
 
        Assert.assertArrayEquals(arr, bundle.getLongArray("foo"));
        assertNull(bundle.getLongArray("bar"));
    } 
 
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray, putSerializable
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putIntArray(KEY_COLORS, mColors);
        outState.putSerializable(KEY_SELECTED_COLOR, mSelectedColor);
    } 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray
    return realIntent;
  } 
 
  @Implementation 
  public Intent putExtra(String key, int[] value) {
    extras.putIntArray(key, value);
    return realIntent;
  } 
 
  @Implementation 
  public Intent putExtra(String key, long[] value) {
    extras.putLongArray(key, value);
    return realIntent;
  } 
 
  @Implementation 
  public int[] getIntArrayExtra(String name) {
    return extras.getIntArray(name);
  } 
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray
        } 
    } 
 
    @Override 
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
 
        if (mCLIRButton.clirArray != null) {
            outState.putIntArray(mCLIRButton.getKey(), mCLIRButton.clirArray);
        } 
    } 
 
    @Override 
    public void onFinished(Preference preference, boolean reading) {
        if (mInitIndex < mPreferences.size()-1 && !isFinishing()) {
            mInitIndex++;
            Preference pref = mPreferences.get(mInitIndex);
            if (pref instanceof CallWaitingCheckBoxPreference) {
                ((CallWaitingCheckBoxPreference) pref).init(this, false);
            } 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray
        return realIntent;
    } 
 
    @Implementation 
    public Intent putExtra(String key, int[] value) {
        extras.putIntArray(key, value);
        return realIntent;
    } 
 
    @Implementation 
    public Intent putExtra(String key, long[] value) {
        extras.putLongArray(key, value);
        return realIntent;
    } 
 
    @Implementation 
    public int[] getIntArrayExtra(String name) {
        return extras.getIntArray(name);
    } 
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray
    public int getTime() { 
        return mInput[4] * 3600 + mInput[3] * 600 + mInput[2] * 60 + mInput[1] * 10 + mInput[0];
    } 
 
    public void saveEntryState(Bundle outState, String key) {
        outState.putIntArray(key, mInput);
    } 
 
    public void restoreEntryState(Bundle inState, String key) {
        int[] input = inState.getIntArray(key);
        if (input != null && mInputSize == input.length) {
            for (int i = 0; i < mInputSize; i++) {
                mInput[i] = input[i];
                if (mInput[i] != 0) {
                    mInputPointer = i;
                } 
            } 
            updateTime(); 
        } 
    } 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putIntArray
   * 
   * @param key a String, or null 
   * @param value an int array object, or null 
   */ 
  public TaskResult add(String key, int[] value) {
    mBundle.putIntArray(key, value);
    return this;
  } 
 
  /** 
   * Inserts a long 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 long array object, or null 
   */ 
  public TaskResult add(String key, long[] value) {
    mBundle.putLongArray(key, value);
    return this;
  } 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Bundle putIntArray Questions & Answers:

putIntArray Method Overview
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.
See Code Examples for other Android Bundle Methods: