@@ -109,26 +109,18 @@ enum ScrollDir {
109109
110110 private ScrollDir scrollDir = ScrollDir .NONE ;
111111
112- /**
113- * Rendered parts go to the cache manager
114- */
112+ /** Rendered parts go to the cache manager */
115113 CacheManager cacheManager ;
116114
117- /**
118- * Animation manager manage all offset and zoom animation
119- */
115+ /** Animation manager manage all offset and zoom animation */
120116 private AnimationManager animationManager ;
121117
122- /**
123- * Drag manager manage all touch events
124- */
118+ /** Drag manager manage all touch events */
125119 private DragPinchManager dragPinchManager ;
126120
127121 PdfFile pdfFile ;
128122
129- /**
130- * The index of the current sequence
131- */
123+ /** The index of the current sequence */
132124 private int currentPage ;
133125
134126 /**
@@ -145,68 +137,46 @@ enum ScrollDir {
145137 */
146138 private float currentYOffset = 0 ;
147139
148- /**
149- * The zoom level, always >= 1
150- */
140+ /** The zoom level, always >= 1 */
151141 private float zoom = 1f ;
152142
153- /**
154- * True if the PDFView has been recycled
155- */
143+ /** True if the PDFView has been recycled */
156144 private boolean recycled = true ;
157145
158- /**
159- * Current state of the view
160- */
146+ /** Current state of the view */
161147 private State state = State .DEFAULT ;
162148
163- /**
164- * Async task used during the loading phase to decode a PDF document
165- */
149+ /** Async task used during the loading phase to decode a PDF document */
166150 private DecodingAsyncTask decodingAsyncTask ;
167151
168- /**
169- * The thread {@link #renderingHandler} will run on
170- */
152+ /** The thread {@link #renderingHandler} will run on */
171153 private final HandlerThread renderingHandlerThread ;
172- /**
173- * Handler always waiting in the background and rendering tasks
174- */
154+ /** Handler always waiting in the background and rendering tasks */
175155 RenderingHandler renderingHandler ;
176156
177157 private PagesLoader pagesLoader ;
178158
179159 Callbacks callbacks = new Callbacks ();
180160
181- /**
182- * Paint object for drawing
183- */
161+ /** Paint object for drawing */
184162 private Paint paint ;
185163
186- /**
187- * Paint object for drawing debug stuff
188- */
164+ /** Paint object for drawing debug stuff */
189165 private Paint debugPaint ;
190166
191- /**
192- * Policy for fitting pages to screen
193- */
167+ /** Policy for fitting pages to screen */
194168 private FitPolicy pageFitPolicy = FitPolicy .WIDTH ;
195169
196170 private int defaultPage = 0 ;
197171
198- /**
199- * True if should scroll through pages vertically instead of horizontally
200- */
172+ /** True if should scroll through pages vertically instead of horizontally */
201173 private boolean swipeVertical = true ;
202174
203175 private boolean enableSwipe = true ;
204176
205177 private boolean doubletapEnabled = true ;
206178
207- /**
208- * Pdfium core for loading and rendering PDFs
209- */
179+ /** Pdfium core for loading and rendering PDFs */
210180 private PdfiumCore pdfiumCore ;
211181
212182 private ScrollHandle scrollHandle ;
@@ -237,26 +207,18 @@ ScrollHandle getScrollHandle() {
237207 */
238208 private boolean renderDuringScale = false ;
239209
240- /**
241- * Antialiasing and bitmap filtering
242- */
210+ /** Antialiasing and bitmap filtering */
243211 private boolean enableAntialiasing = true ;
244212 private PaintFlagsDrawFilter antialiasFilter =
245213 new PaintFlagsDrawFilter (0 , Paint .ANTI_ALIAS_FLAG | Paint .FILTER_BITMAP_FLAG );
246214
247- /**
248- * Spacing between pages, in px
249- */
215+ /** Spacing between pages, in px */
250216 private int spacingPx = 0 ;
251217
252- /**
253- * pages numbers used when calling onDrawAllListener
254- */
218+ /** pages numbers used when calling onDrawAllListener */
255219 private List <Integer > onDrawPagesNums = new ArrayList <>(10 );
256220
257- /**
258- * Construct the initial view
259- */
221+ /** Construct the initial view */
260222 public PDFView (Context context , AttributeSet set ) {
261223 super (context , set );
262224
@@ -449,9 +411,7 @@ public boolean isRecycled() {
449411 return recycled ;
450412 }
451413
452- /**
453- * Handle fling animation
454- */
414+ /** Handle fling animation */
455415 @ Override
456416 public void computeScroll () {
457417 super .computeScroll ();
@@ -626,9 +586,7 @@ private void drawWithListener(Canvas canvas, int page, OnDrawListener listener)
626586 }
627587 }
628588
629- /**
630- * Draw a given PagePart on the canvas
631- */
589+ /** Draw a given PagePart on the canvas */
632590 private void drawPart (Canvas canvas , PagePart part ) {
633591 // Can seem strange, but avoid lot of calls
634592 RectF pageRelativeBounds = part .getPageRelativeBounds ();
@@ -708,9 +666,7 @@ public void loadPages() {
708666 redraw ();
709667 }
710668
711- /**
712- * Called when the PDF is loaded
713- */
669+ /** Called when the PDF is loaded */
714670 void loadComplete (PdfFile pdfFile ) {
715671 state = State .LOADED ;
716672
@@ -1126,41 +1082,32 @@ public List<PdfDocument.Link> getLinks(int page) {
11261082 return pdfFile .getPageLinks (page );
11271083 }
11281084
1129- /**
1130- * Use an asset file as the pdf source
1131- */
1085+ /** Use an asset file as the pdf source */
11321086 public Configurator fromAsset (String assetName ) {
11331087 return new Configurator (new AssetSource (assetName ));
11341088 }
11351089
1136- /**
1137- * Use a file as the pdf source
1138- */
1090+ /** Use a file as the pdf source */
11391091 public Configurator fromFile (File file ) {
11401092 return new Configurator (new FileSource (file ));
11411093 }
11421094
1143- /**
1144- * Use URI as the pdf source, for use with content providers
1145- */
1095+ /** Use URI as the pdf source, for use with content providers */
11461096 public Configurator fromUri (Uri uri ) {
11471097 return new Configurator (new UriSource (uri ));
11481098 }
11491099
1150- /**
1151- * Use bytearray as the pdf source, documents is not saved
1152- */
1100+ /** Use bytearray as the pdf source, documents is not saved */
11531101 public Configurator fromBytes (byte [] bytes ) {
11541102 return new Configurator (new ByteArraySource (bytes ));
11551103 }
11561104
1105+ /** Use stream as the pdf source. Stream will be written to bytearray, because native code does not support Java Streams */
11571106 public Configurator fromStream (InputStream stream ) {
11581107 return new Configurator (new InputStreamSource (stream ));
11591108 }
11601109
1161- /**
1162- * Use custom source as pdf source
1163- */
1110+ /** Use custom source as pdf source */
11641111 public Configurator fromSource (DocumentSource docSource ) {
11651112 return new Configurator (docSource );
11661113 }
0 commit comments