fresco icon indicating copy to clipboard operation
fresco copied to clipboard

can't response touch event when image is loading

Open tcking opened this issue 11 years ago • 2 comments

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>

tcking avatar Nov 24 '15 03:11 tcking

That's by design. Interaction with the image is not allowed until the image is loaded.

plamenko avatar Dec 05 '15 01:12 plamenko

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.

kirwan avatar Sep 04 '17 09:09 kirwan