<com.example.util.TouchImageView
android:id="@+id/imageViewRc"
android:layout_width="match_parent"
android:layout_height="450dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:padding="2dp"
android:layout_marginRight="3dp"
android:src="@drawable/placeholder_background"
android:scaleType="fitXY" />
Below is the code where I am wiring this up:
private void setImageWithPicaso(String imageUrl) {
if (!(imageUrl == null)) {
Picasso.with(getActivity()).load(imageUrl).into(imageView, new Callback() {
@Override
public void onSuccess() {
spinner.setVisibility(View.GONE);
}
@Override
public void onError() {
spinner.setVisibility(View.GONE);
AppLog.showToastMessage(getActivity(), "Rate Card loading failed!");
}
});
} else {
spinner.setVisibility(View.GONE);
AppLog.showToastMessage(getActivity(), "Rate Card loading failed!");
}
}
The download is happening , and when I start pinching the zoom it works Appreciate your time.
答案 0 :(得分:2)
Picasso.with(getActivity())。load(urlToLoad).placeholder(R.drawable.placeholder_background).into(imageView,new Callback() 用上面的代码修改并将一些pic重命名为placeholder_background并将其放入drawables