android - How to bookmark HTML File loaded using WebView from assets? -


i have on 1000 html pages loaded on webview. below demo of code , want option can bookmark page if user clicks on specific button (perhaps bookmark icon in webview). let's if page 45 loaded on screen , user bookmarks it, want page added in listview user can jump specific page.

public class mainactivity extends activity {  @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);      webview webview = (webview) findviewbyid(r.id.webview1);     webview.loadurl("file:///android_asset/1.html");   } } 

ok create database holds list of strings. when user clicks button current url , add database. use adapter populate listview database. problem there?

refer call java function javascript on android webview if need favourite button part of html content (though think bad idea)


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -