5
私は書類のページをWebView
に表示しています。左/右のスワイプを検出するには、次/前のImageButtons
とGestureOverlay
があります。 私は呼んでページ変更したい:WebViewの次/前のページへの切り替え
private void changePage(int delta) {
currentPageIndex = currentPageIndex + delta;
if (currentPageIndex < 0) {
// negative index
currentPageIndex = 0;
} else if (currentPageIndex >= listOfPages.length) {
// index requested is out of range of the list
currentPageIndex = listOfPages.length - 1;
} else {
// set values for page load
filename = listOfPages[currentPageIndex];
mWebView.loadUrl("file:///android_asset/" + filename);
}
}
「listOfPagesは」私のファイル名の文字列配列であるとloadUrlは、()素晴らしい作品が、誰もがページを持つことができるの知っていることをどのような方法があります簡単なページめくりをシミュレートするための移行?
恐ろしい!これを理解するには数時間かかりました。 – sven