Java Code Examples for com.facebook.internal.ImageRequest#getImageUri()
The following examples show how to use
com.facebook.internal.ImageRequest#getImageUri() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserSettingsFragment.java From platform-friends-android with BSD 2-Clause "Simplified" License | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 2
Source File: UserSettingsFragment.java From Klyph with MIT License | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 3
Source File: UserSettingsFragment.java From barterli_android with Apache License 2.0 | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 4
Source File: UserSettingsFragment.java From android-skeleton-project with MIT License | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 5
Source File: UserSettingsFragment.java From FacebookImageShareIntent with MIT License | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 6
Source File: UserSettingsFragment.java From Abelana-Android with Apache License 2.0 | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 7
Source File: UserSettingsFragment.java From KlyphMessenger with MIT License | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }
Example 8
Source File: UserSettingsFragment.java From facebook-api-android-maven with Apache License 2.0 | 4 votes |
private void updateUI() { if (!isAdded()) { return; } if (isSessionOpen()) { connectedStateLabel.setTextColor(getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_text_color)); connectedStateLabel.setShadowLayer(1f, 0f, -1f, getResources().getColor(R.color.com_facebook_usersettingsfragment_connected_shadow_color)); if (user != null) { ImageRequest request = getImageRequest(); if (request != null) { URI requestUrl = request.getImageUri(); // Do we already have the right picture? If so, leave it alone. if (!requestUrl.equals(connectedStateLabel.getTag())) { if (user.getId().equals(userProfilePicID)) { connectedStateLabel.setCompoundDrawables(null, userProfilePic, null, null); connectedStateLabel.setTag(requestUrl); } else { ImageDownloader.downloadAsync(request); } } } connectedStateLabel.setText(user.getName()); } else { connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_logged_in)); Drawable noProfilePic = getResources().getDrawable(R.drawable.com_facebook_profile_default_icon); noProfilePic.setBounds(0, 0, getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)); connectedStateLabel.setCompoundDrawables(null, noProfilePic, null, null); } } else { int textColor = getResources().getColor(R.color.com_facebook_usersettingsfragment_not_connected_text_color); connectedStateLabel.setTextColor(textColor); connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor); connectedStateLabel.setText(getResources().getString( R.string.com_facebook_usersettingsfragment_not_logged_in)); connectedStateLabel.setCompoundDrawables(null, null, null, null); connectedStateLabel.setTag(null); } }