In my application I have one Webview and two buttons next and previous. First time load content from database after that I zoom my Webview and change the page using next button then display content but the zooming is stated.
So my question is that how I change a Webview in initial scale?
I used this:
web1.getSettings().setBuiltInZoomControls(true);
and after click on next page used this:
web1.getSettings().setDefaultZoom(ZoomDensity.FAR);
web1.setInitialScale(100);
but no any effects.
Please help me.
Try using web1.getSettings().setLoadWithOverviewMode(true); and web1.getSettings().setUseWideViewPort(true);
Related
In my activity all content are manage in webview with all web settings.
and my activity content is refresh every 1 second. So when I am trying to
zoom webview. every second webview maintaing its original position.
I want to maintain zoom state in webview. and this happens only in
version 4.0.3.
my webview is in Timer function . and all settings of webview are below .which
outside of Timer function :
web.getSettings().setBuiltInZoomControls(true);
web.getSettings().setSupportZoom(true);
Please help me. If anyone knows.
Maybe if you use these function:
https://developer.android.com/reference/android/webkit/WebSettings.html#getDefaultZoom()
https://developer.android.com/reference/android/webkit/WebSettings.html#setDefaultZoom(android.webkit.WebSettings.ZoomDensity)
You'll be able to read the zoom level before refreshing, and set it again after the refresh if finished?
Android webview auto wraps content while zoom in and out. For example, while zooming in, it wraps one line of text to next line, and therefore the layout is changed. But what I want to achieve is only zooming in without changing any layout. How to achieve it?
Find the solution from here finally.
MyView.getSettings().setLoadWithOverviewMode(true);
MyView.getSettings().setUseWideViewPort(true);
I am working with WebView and my problem is that whenever the scrollbar reaches to the end or top of WebView it should indicate this to me with some boolean value so that I can display the next and previous page correspondingly.
I am working on a project and I want to show a HTML file as a html reader so I want to know whenever the scrollbar reaches the end of webpage so I can load the further pages.
I do recommend you iScroll:
http://cubiq.org/iscroll-4
It's easy to use and it works fairly perfect on every mobile platforms.
I am nearly done with my first app, but I am still working on some little issues.
My main problem is that I am loading a normal html page, but I have no access to the html code.
Now I want to center the page in the webview module, because the page is also centered, so that when I am loading the page, I have to scroll all the time to the right side and that is really anoying.
So how do I do that, that the webview modul automatically loads the page already centered and the user of the app sees the middle of the page?
You mean, you dont want horizontal scroll,for that try this :
mwebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
I have an activity with a WebView. I would like to give the possibility to the user to scroll from one WebView to another WebView (as it's done to Android desktop):
with something in the bottom which shows which screen is actually viewed. I have think about the ScrollView but maybe something else exists which easier to use.
what you want to use is the ViewPager
http://android-developers.blogspot.de/2011/08/horizontal-view-swiping-with-viewpager.html
To get an indicator which shows on what page the user is use:
http://jakewharton.com/viewpagerindicator/
An example how to use it is here:
http://blog.stylingandroid.com/archives/537