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

This code example shows how to use the following methods:containsKey, getParcelable
        assertTrue(request != null);
 
        Bundle parameters = request.getParameters();
        assertTrue(parameters != null);
 
        assertTrue(parameters.containsKey("picture"));
        assertEquals(image, parameters.getParcelable("picture"));
        assertEquals("me/photos", request.getGraphPath());
    } 
 
    @SmallTest 
    @MediumTest 
    @LargeTest 
    public void testCreatePlacesSearchRequestWithLocation() { 
        Location location = new Location("");
        location.setLatitude(47.6204);
        location.setLongitude(-122.3491);
 
        Request request = Request.newPlacesSearchRequest(null, location, 1000, 50, null, null);
 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getInt, getParcelable
 
  @Override 
  public void onRestoreInstanceState(Parcelable ss) {
    Bundle state=(Bundle)ss;
     
    super.onRestoreInstanceState(state.getParcelable(SUPERSTATE));
 
    setColor(state.getInt(COLOR));
  } 
   
  public OnColorChangedListener getOnColorChangedListener() { 
    return(listener);
  } 
   
  public void setOnColorChangedListener(OnColorChangedListener listener) {
    this.listener=listener;
  } 
   
  public int getColor() { 
    return(Color.argb(0xFF, red.getProgress(),
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getLong, getParcelable
        forceLoad();
    } 
 
    @Override 
    public NetworkStats loadInBackground() { 
        final NetworkTemplate template = mArgs.getParcelable(KEY_TEMPLATE);
        final long start = mArgs.getLong(KEY_START);
        final long end = mArgs.getLong(KEY_END);
 
        try { 
            return mSession.getSummaryForAllUid(template, start, end, false);
        } catch (RemoteException e) {
            return null; 
        } 
    } 
 
    @Override 
    protected void onStopLoading() { 
        super.onStopLoading(); 
        cancelLoad();
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getFloat, getParcelable
 
	@Override 
	protected void onRestoreInstanceState(Parcelable state) {
		Bundle savedState = (Bundle) state;
 
		Parcelable superState = savedState.getParcelable(STATE_PARENT);
		super.onRestoreInstanceState(superState);
 
		mAngle = savedState.getFloat(STATE_ANGLE);
		mPointerColor.setColor(calculateColor(mAngle));
	} 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:containsKey, getFloat, getFloatArray, getParcelable
 
	@Override 
	protected void onRestoreInstanceState(Parcelable state) {
		Bundle savedState = (Bundle) state;
 
		Parcelable superState = savedState.getParcelable(STATE_PARENT);
		super.onRestoreInstanceState(superState);
 
		setColor(Color.HSVToColor(savedState.getFloatArray(STATE_COLOR)));
		if (savedState.containsKey(STATE_SATURATION)) {
			setSaturation(savedState.getFloat(STATE_SATURATION));
		} else { 
			setValue(savedState.getFloat(STATE_VALUE));
		} 
	} 
} 
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getInt, getParcelable
 
  @Override 
  public void onRestoreInstanceState(Parcelable ss) {
    Bundle state=(Bundle)ss;
     
    super.onRestoreInstanceState(state.getParcelable(SUPERSTATE));
 
    setColor(state.getInt(COLOR));
  } 
   
  public OnColorChangedListener getOnColorChangedListener() { 
    return(listener);
  } 
   
  public void setOnColorChangedListener(OnColorChangedListener listener) {
    this.listener=listener;
  } 
   
  public int getColor() { 
    return(Color.argb(0xFF, red.getProgress(),
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getBoolean, getInt, getParcelable
        return mFilter;
    } 
 
    @Override 
    public void restoreSavedState(Bundle savedState) {
        super.restoreSavedState(savedState);
 
        if (savedState == null) {
            return; 
        } 
 
        mFilter = savedState.getParcelable(KEY_FILTER);
        mSelectedContactUri = savedState.getParcelable(KEY_SELECTED_URI);
        mSelectionVerified = savedState.getBoolean(KEY_SELECTION_VERIFIED);
        mLastSelectedPosition = savedState.getInt(KEY_LAST_SELECTED_POSITION);
        parseSelectedContactUri(); 
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:containsKey, getParcelable, getString
        } catch (Exception e) {
            throw new AuthFailureError("Error while retrieving auth token", e);
        } 
        String authToken = null;
        if (future.isDone() && !future.isCancelled()) {
            if (result.containsKey(AccountManager.KEY_INTENT)) {
                Intent intent = result.getParcelable(AccountManager.KEY_INTENT);
                throw new AuthFailureError(intent);
            } 
            authToken = result.getString(AccountManager.KEY_AUTHTOKEN);
        } 
        if (authToken == null) {
            throw new AuthFailureError("Got null auth token for type: " + mAuthTokenType);
        } 
 
        return authToken;
    } 
 
    @Override 
    public void invalidateAuthToken(String authToken) {
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getFloat, getFloatArray, getParcelable
 
	@Override 
	protected void onRestoreInstanceState(Parcelable state) {
		Bundle savedState = (Bundle) state;
 
		Parcelable superState = savedState.getParcelable(STATE_PARENT);
		super.onRestoreInstanceState(superState);
 
		setColor(Color.HSVToColor(savedState.getFloatArray(STATE_COLOR)));
		setValue(savedState.getFloat(STATE_VALUE));
	} 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getParcelable
    return extras.getString(name);
  } 
 
  @Implementation 
  public Parcelable getParcelableExtra(String name) {
    return extras.getParcelable(name);
  } 
 
  @Implementation 
  public Parcelable[] getParcelableArrayExtra(String name) {
    return extras.getParcelableArray(name);
  } 
 
  @Implementation 
  public int getIntExtra(String name, int defaultValue) {
    return extras.getInt(name, defaultValue);
  } 
 
  @Implementation 
  public long getLongExtra(String name, long defaultValue) {
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Bundle getParcelable Questions & Answers:

Other Bundle getParcelable Examples

128:	
129:			// get the file url
130:			fileUri = savedInstanceState.getParcelable("file_uri");
131:		}
132:

Read More

19:	
20:			// get the file url
21:			fileUri = savedInstanceState.getParcelable("file_uri");
22:		}
23:

Read More

getParcelable 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: