I have a webview in my android app. How can I find div position according to the screen (the webview may be outside the screen or only partially on the screen). I know I can ask the native code using "addJavascriptInterface", but i want to do it using only the javascript code. can it be done ?
No it cannot be done. A webview doesn't have any access to information about layout in your application. Best solution would be to expose required information via native interface as you mentioned.
Related
I'm currently using https://github.com/react-native-webview/react-native-webview for a website to load within the app. The app is essentially a glorified website so everything in implemented on webapp.
Anyway, I've bunch of stylings changes based on window.onscroll function in webapp.
Obviously they work just fine when loaded from browser, whether it be mobile or desktop.
My problem is the react native web view doesn't respond to any of those functions from window.onscroll.
I tried to do something like injectJavaScript inside but there are many on scroll functions and that will basically mean i am replicating same thing from web to ReactNative just to inject JS. Even then, some variables are dynamic so injectJavaScript essentioally woudln't work unless that injected JS triggers on scroll function somehow.
How can I solve this issue?
TLDR; window.onscroll function on webview is not being triggered when loaded from webview.
It was a bug from google.
Android System WebView was having problem this few time but it was fixed on February 1. That's what I mean.
Kindly go on playstore and search for Android System WebView and update it and try again
I've got a web site "application" which is not an app, but an actual web page you'd use through Chrome or some other browser. In iOS invoking the keyboard (via an input element for example) doesn't change the viewport ratio or resize anything, but on Android it does. This is causing insane layout problems for my app "page", as we have to distinguish between portrait and landscape view orientations.
I found many answers about android:windowSoftInputMode activity configs w/rt keyboard display and interaction with media queries, and how to specify your desired value (in my case, "adjustNothing"), but I haven't found anything on how to invoke this configuration when you're looking at a web page via chrome or any other browser.
So does anyone know of a way to do this via JavaScript or some other in-page code? Thanks.
I am trying to create a mobile app with HTML5, CSS, and JavaScript and want to use Phonegap Build for compiling it for the mobile devices.
So most mobile apps in an App Store have custom start Screen when you start the app it shows you at the beginning the Company logo or game logo. So how is it possible to do it with HTML5, CSS, and JavaScript.
I already searching use the search engines with may keyword combine with Phonegap or Titanium to get an example or an idea how to do that.
But nothing, so many maybe you could give me any advice.
The documentation for the splashscreen is in the link below. Not used phonegap build but I assume you configure it in the same way.
It is done by an image rather than html & css.
http://docs.phonegap.com/en/3.5.0/config_ref_images.md.html
I am using the magnific-popup (http://dimsemenov.com/plugins/magnific-popup/) but I don't need to use this one. I have just used it before and it worked well.
My questions is how to actually trigger different lightboxes from inside a SWF?
We have one SWF that has images and animation located at six different sections of the screen. It's sort of a launch page and each section has an image with some animation and when the users clicks on a section another web page will load.
This application will be hosted on a computer with a touch screen and we were using a kiosk app to run the app and it had a small navigation bar built in but now we are using a different operating system that works better with the touch screen hardware (OSX to Windows 8) but does not work with the same kiosk app. I also can't seem to find any kiosk apps that do the same thing for Windows 8.
Instead of using a Kiosk app I would like to just use Chrome in Kiosk/Fullscreen mode and have each section open in a new lightbox window instead of using a navigation bar. However, I can't seem to trigger the lightbox event from within the SWF itself.
Any help greatly appreciated.
In as2 something like this getURL("javascript: lightbox(maybe-attributes);"); or using flash.external.ExternalInterface class. I don't know in as3 if there's another class/method
Christian find perfect match with this jquery/flash.external.ExternalInterface
http://grasshopperpebbles.com/jquery/actionscript-using-lightbox-with-flash/
I am developing a web-based database that needs to be opened through firefox web browser(because of some css3 elements). I want the page to open automatically in full screen mode. I dont want the user of the database to have access to the firefox menu items
Can't be done if you just have control of the webpage. Controls in the webpage cannot cause changes in the browser instance itself.
It would be a security issue if that were allowed. You could look into writing a Firefox extension to do that, as they have more access to the browser instance itself.
You shouldn't look at trying to hide the firefox menu controls. That seems like a flaw in your problem-solving approach.
You will want to look at Fullscreen APIs of the browser. If you accept a small request/info to the user in the application it can be done quite easily. You just can't force the user into Fullscreen mode against his will. This is good (for security reasons).
http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/