We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to make him disappear when I click, how can I do it?
The text was updated successfully, but these errors were encountered:
Please, add this functionality
Sorry, something went wrong.
I used an overlay view to add a close button, which I could then add an OnClickListener to, to close the image viewer:
private StfalconImageViewer<String> imageViewer; public MyClass(Activity context) { this.pictureDetailsView = context.getLayoutInflater().inflate(R.layout.item_image_overlay_view, null, false); this.imageViewer = new StfalconImageViewer.Builder<>(context, imageUrlList, imageLoader) .withStartPosition(0) .withOverlayView(pictureDetailsView) .build(); ImageView closeImageView = this.pictureDetailsView.findViewById(R.id.ivCloseImageView); closeImageView.setOnClickListener(v -> { if(imageViewer != null) { imageViewer.close(); } }); }
item_image_overlay_view.xml
<ImageView android:id="@+id/ivCloseImageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:clickable="true" android:focusable="true" app:srcCompat="@drawable/ic_close" app:tint="@color/mea_background_90" />
I think a good way to do this is through . withOverlayView;
custom overlay to recognize click event
troy379
No branches or pull requests
I want to make him disappear when I click, how can I do it?
The text was updated successfully, but these errors were encountered: