Example usage for android.print PageRange ALL_PAGES

List of usage examples for android.print PageRange ALL_PAGES

Introduction

In this page you can find the example usage for android.print PageRange ALL_PAGES.

Prototype

PageRange ALL_PAGES

To view the source code for android.print PageRange ALL_PAGES.

Click Source Link

Document

Constant for specifying all pages.

Usage

From source file:android.webkit.cts.WebViewTest.java

private void savePrintedPage(final PrintDocumentAdapter adapter, final ParcelFileDescriptor descriptor,
        final FutureTask<Boolean> result) {
    adapter.onWrite(new PageRange[] { PageRange.ALL_PAGES }, descriptor, new CancellationSignal(),
            new WriteResultCallback() {
                @Override/*from w w  w . j  a  v a  2s . c  o  m*/
                public void onWriteFinished(PageRange[] pages) {
                    try {
                        descriptor.close();
                        result.run();
                    } catch (IOException ex) {
                        fail("Failed file operation: " + ex.toString());
                    }
                }
            });
}