Bundle getStringArray - 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 getStringArray method.

This code example shows how to use the following methods:getStringArray, putStringArray
    assertFalse(bundle.isEmpty());
  } 
 
  @Test 
  public void testStringArray() { 
    bundle.putStringArray("foo", new String[] { "a" });
    Assert.assertArrayEquals(new String[] { "a" }, bundle.getStringArray("foo"));
    assertNull(bundle.getStringArray("bar"));
  } 
 
  @Test 
  public void testStringArrayList() { 
    ArrayList<String> list = new ArrayList<String>();
    list.add("a");
 
    bundle.putStringArrayList("foo", new ArrayList<String>(list));
    Assert.assertEquals(list, bundle.getStringArrayList("foo"));
    assertNull(bundle.getStringArrayList("bar"));
  } 
 
8
CodeRank
This code example shows how to use the following methods:getStringArray, putStringArray
        assertFalse(bundle.isEmpty());
    } 
 
    @Test 
    public void testStringArray() { 
        bundle.putStringArray("foo", new String[] { "a" });
        Assert.assertArrayEquals(new String[] { "a" }, bundle.getStringArray("foo"));
        assertNull(bundle.getStringArray("bar"));
    } 
 
    @Test 
    public void testStringArrayList() { 
        ArrayList<String> list = new ArrayList<String>();
        list.add("a");
 
        bundle.putStringArrayList("foo", new ArrayList<String>(list));
        Assert.assertEquals(list, bundle.getStringArrayList("foo"));
        assertNull(bundle.getStringArrayList("bar"));
    } 
 
8
CodeRank
This code example shows how to use the following methods:getStringArray
    return extras.getBoolean(name, defaultValue);
  } 
 
  @Implementation 
  public String[] getStringArrayExtra(String name) {
    return extras.getStringArray(name);
  } 
 
  @Implementation 
  public Intent putExtra(String key, CharSequence value) {
    extras.putCharSequence(key, value);
    return realIntent;
  } 
 
  @Implementation 
  public CharSequence getCharSequenceExtra(String name) {
    return extras.getCharSequence(name);
  } 
 
  @Implementation 
6
CodeRank
This code example shows how to use the following methods:getStringArray
        return extras.getBoolean(name, defaultValue);
    } 
 
    @Implementation 
    public String[] getStringArrayExtra(String name) {
        return extras.getStringArray(name);
    } 
 
    @Implementation 
    public Intent putExtra(String key, CharSequence value) {
        extras.putCharSequence(key, value);
        return realIntent;
    } 
 
    @Implementation 
    public CharSequence getCharSequenceExtra(String name) {
        return extras.getCharSequence(name);
    } 
 
    @Implementation 
6
CodeRank

Related Bundle getStringArray Questions & Answers:

getStringArray Method Overview
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
See Code Examples for other Android Bundle Methods: