fresco
fresco copied to clipboard
can't response touch event when image is loading
hi: SimpleDraweeView can't response onclick nor parent's (SwipeRefreshLayout) refresh touch event when image is loading,but it can be ok when image is display or download faild。
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
String imageURL = getArguments().getString("imageURL");
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View view) {
Router.go(getArguments().getString("url"));
}
};
((SimpleDraweeView) aQuery.id(R.id.iv_banner).clicked(listener).getView()).setImageURI(Uri.parse(imageURL));
}
layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_banner"
android:layout_width="match_parent"
android:layout_height="180dp"
fresco:actualImageScaleType="focusCrop"
fresco:placeholderImage="@color/Grey_300"
fresco:placeholderImageScaleType="fitCenter"
fresco:failureImage="@color/Grey_300"
fresco:failureImageScaleType="centerInside"
/>
</LinearLayout>
That's by design. Interaction with the image is not allowed until the image is loaded.
We're cleaning up long-untouched issues so I'm closing this one.
If you think this is still an issue, feel free to comment and we can re-open.