Skip to content
New issue

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

Implement back button in toolbar #95

Open
degrigorash opened this issue Jan 22, 2019 · 1 comment
Open

Implement back button in toolbar #95

degrigorash opened this issue Jan 22, 2019 · 1 comment

Comments

@degrigorash
Copy link

I'm implementing a toolbar in the overlay view by custom layout with buttons. How can I get the main content to dismiss it like real back button in toolbar?

@frapeti
Copy link

frapeti commented Apr 18, 2019

ImageViewer imageViewer = new ImageViewer.Builder(MapsActivity.this, images).setStartPosition(0)
                        .hideStatusBar(false)
                        .allowZooming(true)
                        .setBackgroundColorRes(R.color.black)
                        .allowSwipeToDismiss(true)
                        .setOverlayView(overlayView)
                        .show();

overlayView.findViewById(R.id.back_arrow)
        .setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        imageViewer.onDismiss();
                    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants