Android ImageResponse - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ImageResponse class.

This code example shows how to use the following methods:getBitmap, getRequest
        return request;
    } 
 
    private void processImageResponse(String id, ImageResponse response) {
        if (response != null) {
            Bitmap bitmap = response.getBitmap();
            if (bitmap != null) {
                BitmapDrawable drawable = new BitmapDrawable(UserSettingsFragment.this.getResources(), bitmap);
                drawable.setBounds(0, 0,
                        getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), 
                        getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); 
                userProfilePic = drawable;
                userProfilePicID = id;
                connectedStateLabel.setCompoundDrawables(null, drawable, null, null);
                connectedStateLabel.setTag(response.getRequest().getImageUri());
            } 
        } 
    } 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getBitmap, getError, getRequest
        } 
    } 
 
    private void processImageResponse(ImageResponse response, String graphObjectId, ImageView imageView) {
        pendingRequests.remove(graphObjectId);
        if (response.getError() != null) {
            callOnErrorListener(response.getError());
        } 
 
        if (imageView == null) {
            // This was a pre-fetch request. 
            if (response.getBitmap() != null) {
                // Is the cache too big? 
                if (prefetchedPictureCache.size() >= MAX_PREFETCHED_PICTURES) {
                    // Find the oldest one and remove it. 
                    String oldestId = prefetchedProfilePictureIds.remove(0);
                    prefetchedPictureCache.remove(oldestId);
                } 
                prefetchedPictureCache.put(graphObjectId, response);
            } 

7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getBitmap, getError, getRequest
        } 
    } 
 
    private void processImageResponse(ImageResponse response, String graphObjectId, ImageView imageView) {
        pendingRequests.remove(graphObjectId);
        if (response.getError() != null) {
            callOnErrorListener(response.getError());
        } 
 
        if (imageView == null) {
            // This was a pre-fetch request. 
            if (response.getBitmap() != null) {
                // Is the cache too big? 
                if (prefetchedPictureCache.size() >= MAX_PREFETCHED_PICTURES) {
                    // Find the oldest one and remove it. 
                    String oldestId = prefetchedProfilePictureIds.remove(0);
                    prefetchedPictureCache.remove(oldestId);
                } 
                prefetchedPictureCache.put(graphObjectId, response);
            } 

4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getBitmap, getRequest
						R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); 
				userProfilePic = drawable;
				userProfilePicID = id;
				connectedStateLabel.setCompoundDrawables(null, drawable, null, null);
				connectedStateLabel.setTag(response.getRequest().getImageUri());
			} 
		} 
	} 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Android ImageResponse Methods: