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

GoTo Page Behaviour #14

Closed
samsoft00 opened this issue Oct 26, 2015 · 3 comments
Closed

GoTo Page Behaviour #14

samsoft00 opened this issue Oct 26, 2015 · 3 comments

Comments

@samsoft00
Copy link

Hello @teckinarslan, great libs, please how can i implement GoTo behavior, i want the user to be able to go to a particular page (Example page 12). Thanks

@samsoft00
Copy link
Author

@tekinarslan I'm still waiting for your response on this.. if you've any other option, kindly let me know. Thanks

@tekinarslan
Copy link
Owner

Hı, if you modify gotoPage method of muPdfCore class, you can go to specific page.But I dont want to license info for modify any library code.

@samsoft00
Copy link
Author

@tekinarslan Thanks for your response, i really appreciate... i've implement the logic but its not working...

    public void goToNewPage(){
        ArrayAdapter<String> numPages = new ArrayAdapter<String>(getActivity(),
                android.R.layout.simple_spinner_dropdown_item,
                new String[]{"Page 1", "Page 2", "Page 3"});


        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

        ActionBar.OnNavigationListener listener = new ActionBar.OnNavigationListener() {
            @Override
            public boolean onNavigationItemSelected(int i, long l) {
                core.gotoPage(i+1); //not working
                return false;
            }
        };

        actionBar.setListNavigationCallbacks(numPages, listener);
    }

Thanks for your help!

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