foodImage=(ImageView)getView().findViewById(R.id.imageView2);
String url1="https://d9hyo6bif16lx.cloudfront.net/live/img/production/detail/menu/lunch-dinner_soups-salads_crispy-chicken-salad.jpg";
Picasso.with(getActivity().getApplicationContext()).load(url1).fit().into(foodImage);
我无法检索图像,这给了我空白。感谢您的建议。
答案 0 :(得分:0)
将毕加索的依赖关系更新为
implementation 'com.squareup.picasso:picasso:2.71828'
并将代码修改为-
Picasso.get().load(url1).resize(100,100).centerCrop().into(foodImage);