Skip to content

Commit 077d085

Browse files
committed
update: README.md
1 parent 3fa99c1 commit 077d085

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ pdfView.loadPdf("http://.....xx.pdf");
5454
```java
5555
pdfView.loadPdf("file:///android_asset/test.pdf");
5656
```
57+
 
58+
自定义预览操作条:
59+
首先继承于 `AbsControllerBar`, 重写 `getView` 方法返回自定义的视图
60+
```
61+
public class CustomControllerBar extends AbsControllerBar {
62+
public View getView() {
63+
//...
64+
}
65+
}
66+
```
67+
通过 `setPDFController` 设置自定义的Controller即可
68+
```java
69+
CustomControllerBar controllerBar = new CustomControllerBar(this);
70+
pdfView.setPDFController(controllerBar);
71+
```
5772

5873
### 2.以页面方式调起
5974
以页面的形式,自带了默认的顶部标题栏,适配Android 5.0以下,会自动下载并调用浏览器打开

0 commit comments

Comments
 (0)