本文整理匯總了Java中com.facebook.drawee.view.SimpleDraweeView.setImageURI方法的典型用法代碼示例。如果您正苦於以下問題:Java SimpleDraweeView.setImageURI方法的具體用法?Java SimpleDraweeView.setImageURI怎麽用?Java SimpleDraweeView.setImageURI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.drawee.view.SimpleDraweeView
的用法示例。
在下文中一共展示了SimpleDraweeView.setImageURI方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convert
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
protected void convert(BaseViewHolder viewHolder, final Wares wares) {
SimpleDraweeView draweeView = (SimpleDraweeView) viewHolder.getView(R.id.drawee_view);
draweeView.setImageURI(Uri.parse(wares.getImgUrl()));
viewHolder.getTextView(R.id.text_title).setText(wares.getName());
viewHolder.getTextView(R.id.text_price).setText("¥ "+wares.getPrice());
Button button =viewHolder.getButton(R.id.btn_add);
if(button !=null) {
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
provider.put(wares);
ToastUtils.show(context, "已添加到購物車");
}
});
}
}
示例2: onCreate
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_drawee_transition_detail);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) findViewById(R.id.image);
simpleDraweeView.setImageURI(getIntent().getData());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setSharedElementEnterTransition(DraweeTransition.createTransitionSet(
ScalingUtils.ScaleType.CENTER_CROP, ScalingUtils.ScaleType.FIT_CENTER));
getWindow().setSharedElementReturnTransition(DraweeTransition.createTransitionSet(
ScalingUtils.ScaleType.FIT_CENTER, ScalingUtils.ScaleType.CENTER_CROP));
}
}
示例3: onViewCreated
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
final ImageUriProvider imageUriProvider = ImageUriProvider.getInstance(getContext());
final Uri imageUri = imageUriProvider.createSampleUri(ImageUriProvider.ImageSize.M);
final SimpleDraweeView simpleDraweeView =
(SimpleDraweeView) view.findViewById(R.id.drawee_view);
// You have to enable legacy visibility handling for the start view in order for this to work
simpleDraweeView.setLegacyVisibilityHandlingEnabled(true);
simpleDraweeView.setImageURI(imageUri);
simpleDraweeView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startTransition(v, imageUri);
}
});
}
示例4: load
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
private void load(ImageView target, Uri uri, Options options) {
if (target == null) {
throw new NullPointerException("this imageView is null.");
}
if (options == null) options = Options.defaultOptions();
if (target instanceof SimpleDraweeView) {
ViseLog.i("Fresco Load SimpleDraweeView Path:" + uri.getPath());
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) target;
simpleDraweeView.setImageURI(uri);
if (options.loadingResId != Options.RES_NONE) {
simpleDraweeView.getHierarchy().setPlaceholderImage(options.loadingResId);
}
if (options.loadErrorResId != Options.RES_NONE) {
simpleDraweeView.getHierarchy().setFailureImage(options.loadErrorResId);
}
} else {
ViseLog.e("Fresco Load ImageView must be SimpleDraweeView");
}
}
示例5: getView
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = getLayoutInflater().inflate(R.layout.swipe_card, parent, false);
}
SimpleDraweeView imageView = (SimpleDraweeView) convertView.findViewById(R.id.community_group_image);
TextView textViewCard = (TextView) convertView.findViewById(R.id.textViewCard);
TextView members_in_group = (TextView) convertView.findViewById(R.id.members_in_group);
TextView group_tags_01 = (TextView) convertView.findViewById(R.id.group_tags_01);
TextView group_tags_02 = (TextView) convertView.findViewById(R.id.group_tags_02);
TextView group_tags_03 = (TextView) convertView.findViewById(R.id.group_tags_03);
TextView group_details = (TextView) convertView.findViewById(R.id.group_details);
group_tags_01.setText(mData.get(position).getCategoryName());
group_details.setText(mData.get(position).getGroup_description());
textViewCard.setText(mData.get(position).getGroupName());
members_in_group.setText(String.valueOf(mData.get(position).getGroup_members_joined() + " " + "members" + " " +
mData.get(position).getGroup_posts_inside() + " " + "posts"));
imageView.setImageURI(mData.get(position).getGroup_image_url());
imageView.setBackground(getResources().getDrawable(R.drawable.gradient_bg));
return convertView;
}
示例6: fillUserProfileData
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
private void fillUserProfileData() {
SimpleDraweeView imageView = (SimpleDraweeView) navigationView.getHeaderView(0).findViewById(R.id.imageView);
TextView txtUserProfileName = (TextView) navigationView.getHeaderView(0).findViewById(R.id.txtUserProfileName);
TextView txtProfileEmail = (TextView) navigationView.getHeaderView(0).findViewById(R.id.txtProfileEmail);
// Check if user is signed in (non-null) and update UI accordingly.
FirebaseUser currentUser = mAuth.getCurrentUser();
// Name, email address, and profile photo Url
txtUserProfileName.setText(currentUser.getDisplayName());
txtProfileEmail.setText(currentUser.getEmail());
Uri photoUrl = currentUser.getPhotoUrl();
//set round icon
if (photoUrl != null) {
int color = ContextCompat.getColor(this, R.color.colorPrimary);
RoundingParams roundingParams = RoundingParams.fromCornersRadius(5f);
roundingParams.setBorder(color, 1.0f);
roundingParams.setRoundAsCircle(true);
imageView.getHierarchy().setRoundingParams(roundingParams);
imageView.setImageURI(photoUrl);//.setImageBitmap(stationImageSmall);
}
}
示例7: convert
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
protected void convert(BaseViewHolder viewHoder, final ShoppingCart item) {
// viewHoder.getTextView(R.id.text_title).setText(item.getName());
// viewHoder.getTextView(R.id.text_price).setText("¥"+item.getPrice());
SimpleDraweeView draweeView = (SimpleDraweeView) viewHoder.getView(R.id.drawee_view);
draweeView.setImageURI(Uri.parse(item.getImgUrl()));
}
示例8: convert
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
protected void convert(BaseViewHolder viewHoder, Category item) {
viewHoder.getTextView(R.id.text_title).setText(item.getName());
SimpleDraweeView draweeView = (SimpleDraweeView) viewHoder.getView(R.id.drawee_view);
draweeView.setImageURI(Uri.parse(Contants.API.BASE_URL+item.getWrap_ptlist_threeImage()));
}
示例9: onViewCreated
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
final SimpleDraweeView simpleDraweeView = view.findViewById(R.id.drawee_view);
simpleDraweeView.setImageURI(dataUri, null);
final TextView uriContentTextView = view.findViewById(R.id.datauri_content_textview);
uriContentTextView.setText(dataUri);
}
示例10: onViewCreated
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
final ImageUriProvider imageUriProvider = ImageUriProvider.getInstance(getContext());
final Uri uri = imageUriProvider.createSampleUri(ImageUriProvider.ImageSize.M);
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.drawee_view);
simpleDraweeView.setImageURI(uri);
}
示例11: onCreateView
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_profile,container,false);
ProfileImage = (SimpleDraweeView) rootView.findViewById(R.id.Profile_picture);
userName = (TextView) rootView.findViewById(R.id.name);
ProfileImage.setImageURI(Utils.getPhoto());
userName.setText(Utils.getName());
return rootView;
}
示例12: setFresco
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
private void setFresco(SimpleDraweeView simpleDraweeView, AlbumInfo albumInfo, int width, boolean isGif) {
if (albumInfo.getWidth() != null && albumInfo.getHeight() != null) {
if (isGif)
simpleDraweeView.setImageURI(albumInfo.getPicUrl());
else
simpleDraweeView.setImageURI(albumInfo.getGifThumbUrl());
ViewGroup.LayoutParams l = simpleDraweeView.getLayoutParams();
l.width = albumInfo.getWidth();
l.height = albumInfo.getHeight();
simpleDraweeView.setLayoutParams(l);
} else
FrescoUtil.setControllerListener(simpleDraweeView, albumInfo, width, isGif);
}
示例13: getView
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.squareitem,
null);
}
SimpleDraweeView image = (SimpleDraweeView) convertView.findViewById(R.id.icon);
TextView text = (TextView) convertView.findViewById(R.id.text);
TextView members_in_group = (TextView) convertView.findViewById(R.id.members_in_group);
image.setImageURI(dataSet.get(position).getGroup_image_url());
text.setText(dataSet.get(position).getCategoryName());
members_in_group.setText(dataSet.get(position).getGroup_members_joined() + " members");
return convertView;
}
示例14: bindData
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
public void bindData(BaseViewHolder holder, MyMessage myMessage) {
holder.getTextView(R.id.tv_massage_time).setText(myMessage.getTime());
holder.getTextView(R.id.tv_massage_content).setText(myMessage.getDecrdescription());
SimpleDraweeView sdw = (SimpleDraweeView) holder.getView(R.id.iv_massage_photo);
sdw.setImageURI(myMessage.getImgUrl());
}
示例15: convert
import com.facebook.drawee.view.SimpleDraweeView; //導入方法依賴的package包/類
@Override
protected void convert(BaseViewHolder viewHolder, final Favorites favorites) {
Wares wares = favorites.getWares();
SimpleDraweeView draweeView = (SimpleDraweeView) viewHolder.getView(R.id.drawee_view);
draweeView.setImageURI(Uri.parse(wares.getImgUrl()));
viewHolder.getTextView(R.id.text_title).setText(wares.getName());
viewHolder.getTextView(R.id.text_price).setText("¥ "+wares.getPrice());
Button buttonRemove =viewHolder.getButton(R.id.btn_remove);
Button buttonLike =viewHolder.getButton(R.id.btn_like);
buttonRemove.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}