Open newjing opened 11 years ago
Just found that the official demo "iscrollview/demo/build/index_13.html" also has the address bar problem on Android 2.3.4 (Galaxy II)
It sizes to fit the page. Unfortunately, if the address bar is shown then, of course, it sizes the page to fit under the address bar.
The code addresses this specifically for iOS and makes an adjustment for the address bar.
Unfortunately, this is likely quite difficult to impossible for Android, because of lack of standardization. On iOS, I can count on the # of pixels for the address bar to be consistent.
I'm open to suggestions and pull requests if you can figure out how to make this work across a range of Android devices and browsers.
I'm afraid the only work I do with Android is PhoneGap, and in that environment there is no address bar. So, this hasn't been a priority.
Jtata, thank you for your reply. I guess there is a workaround for all Android devices: Automatically add 100px (biggerer than any address bar height) to JQM iscrollview scrollerH and wrapperH, so that the window.scrollTo(0,1) can hide the address bar. Maybe the bottom-most part of the wrapper become invisible but it doesn't matter because bigger scrollH has added extra space in the bottom. The only concern might be the modification on pull-to-refresh accordingly.
The reason I believe the way above can work is that JQM can hide the address bar well, and the issue with iscrollview is due to (wrapperH + headerHight < deviceHeight).
It would be great if you can pull request on this, coz android fullscreen is fairly important. Thank you!
I've written a very simple page as below:
* no extra js *
It works well on iOS, however, on my native browser of Android 2.3.4, the address bar is always hidden first and then pushes down. Also, it cannot be hid by either refresh or orientationchange.
It feels like the jquery-mobile-iscrollview rendering shortens the height so that the address bar is dragged down.
Seeking help....................thank you, please!