@@ -47,41 +47,41 @@ Use **ScrollBar** class to place scrollbar view near **PDFView**
47
47
48
48
1 . in layout XML (it's important that the parent view is ** RelativeLayout** )
49
49
50
- ``` xml
51
- <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
52
- android:layout_width=" match_parent"
53
- android:layout_height=" match_parent" >
54
-
55
- <com .github.barteksc.pdfviewer.PDFView
56
- android : id =" @+id/pdfView"
50
+ ``` xml
51
+ <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
57
52
android : layout_width =" match_parent"
58
- android : layout_height =" match_parent"
59
- android:layout_toLeftOf=" @+id/scrollBar" />
60
-
61
- <com .github.barteksc.pdfviewer.ScrollBar
62
- android:id=" @+id/scrollBar"
63
- android:layout_width=" wrap_content"
64
- android:layout_height=" match_parent"
65
- android:layout_alignParentRight=" true"
66
- android:layout_alignParentEnd=" true" />
67
-
68
- </RelativeLayout >
69
- ```
53
+ android : layout_height =" match_parent" >
54
+
55
+ <com .github.barteksc.pdfviewer.PDFView
56
+ android : id =" @+id/pdfView"
57
+ android : layout_width =" match_parent"
58
+ android : layout_height =" match_parent"
59
+ android : layout_toLeftOf =" @+id/scrollBar" />
60
+
61
+ <com .github.barteksc.pdfviewer.ScrollBar
62
+ android : id =" @+id/scrollBar"
63
+ android : layout_width =" wrap_content"
64
+ android : layout_height =" match_parent"
65
+ android : layout_alignParentRight =" true"
66
+ android : layout_alignParentEnd =" true" />
67
+
68
+ </RelativeLayout >
69
+ ```
70
70
2. in activity or fragment
71
- ``` java
71
+ ``` java
72
72
73
- @Override
74
- protected void onCreate(Bundle savedInstanceState) {
75
- super . onCreate(savedInstanceState);
73
+ @Override
74
+ protected void onCreate(Bundle savedInstanceState) {
75
+ super.onCreate(savedInstanceState);
76
76
77
- ...
77
+ ...
78
78
79
- PDFView pdfView = (PDFView ) findViewById(R . id. pdfView);
80
- ScrollBar scrollBar = (ScrollBar ) findViewById(R . id. scrollBar);
81
- pdfView. setScrollBar(scrollBar);
82
- }
79
+ PDFView pdfView = (PDFView) findViewById(R.id.pdfView);
80
+ ScrollBar scrollBar = (ScrollBar) findViewById(R.id.scrollBar);
81
+ pdfView.setScrollBar(scrollBar);
82
+ }
83
83
84
- ```
84
+ ```
85
85
86
86
Scrollbar styling:
87
87
``` xml
@@ -95,6 +95,9 @@ Scrollbar styling:
95
95
/>
96
96
```
97
97
98
+ ** ScrollBarPageIndicator** is added to scrollbar automatically and is shown while dragging scrollbar handler,
99
+ displaying number of page on current position.
100
+
98
101
## Additional options
99
102
100
103
### Bitmap quality
0 commit comments