Set RTL scroll direction for PDFView - Android

无人久伴 提交于 2019-12-12 02:24:37

问题


I am using one Github library for view PDF file. https://github.com/barteksc/AndroidPdfViewer

i want to set scroll direction RTL. please help to change scroll direction of this library.

I have tried solution from below link https://github.com/JoanZapata/android-pdfview/issues/60

but its not worked for me.


回答1:


I have found a hack. Rotate your pdf by 180 degress and then add following line in your code

pdf_activity_read_quraan.rotation = 180F

where is pdf_activity_read_quraan is reference of com.github.barteksc.pdfviewer.PDFView




回答2:


Try adding android:supportsRtl="true" in Application tag of the manifest file.

Source : https://developer.android.com/guide/topics/manifest/application-element.html


Possible workaround would be acquiring the scroll and force move like this :

mScrollView.postDelayed(new Runnable() {
    public void run() {
        scrollView.fullScroll(HorizontalScrollView.FOCUS_RIGHT); // or scrollTo
    }
}, 100L);


来源:https://stackoverflow.com/questions/43183645/set-rtl-scroll-direction-for-pdfview-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!