Scroll Webview

Rusty

Well-Known Member
Licensed User
Longtime User
I have added a webview to my activity and it navigates to HTML code in my database (properly formed). The HTML code is larger than the webview and I would like to be able to scroll the results from the HTML by dragging a finger (vertically) and/or pressing a button like page down/page up.
Any suggestions or even sample code?
Thanks,
 

barx

Well-Known Member
Licensed User
Longtime User
Webview scrolls vertically anyway. Well, at least it does in my app and I didn't do anything special.
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Is your webview on the activity, or a scrollview or ??
Is the webivew merely defined as larger than the activity? What do you think is making it scroll?
Thanks,
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Is your webview on the activity, or a scrollview or ??
Is the webivew merely defined as larger than the activity? What do you think is making it scroll?
Thanks,

It's part of the package attached to post one in this thread

http://www.b4x.com/forum/basic4android-updates-questions/15136-required-permissions.html

Download it a take a look.

The 'Detail' and 'InstructionDetail' both use webviews to similar effect but I used different methods of getting data from database and adding it to webview to see which would work out best for me. InstructionDetail is probably easiest to follow. The webview doesn't overlap the screen or anything like that. In fact the hole reasons I used a webview was because it would be alot easier to load differing amounts of data with having to manually resize the view (i.e. it scolls). Also easier to format the texts. I just store the html in the database.
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks for the example, greatly appreciated!
Worked perfectly and very simple.
Any chance someone knows how to make the zoom in/out "buttons" show without having to touch the webview itself?
Thanks
 
Upvote 0
Top