I am trying to lock my screen orientation to horizontal view for the whole app always. I added a config.xml line that reads
but it doesn't have any affect when I test it. Does this need to be in a certain place in the xml, before or after other things? Also, I am testing using the Ionic lab view in the browser and the Ionic view app on my phone, could either of these not implement the xml?
Further more, I have also tried the cordova screen orientation plugin with no luck. Is this also because Ionic view app doesn't use the plug in for some reason? I end up with a white screen if I try my app with the plugin and Ionic view app. The code for that is just: screen.lockOrientation('landscape');
So finally, to sum up the questions:
config.xml doesn't work with the preference stated above, why?
Is Ionic view app not supporting my code fully? (ie. do they implement the app weird from there end)
in AndroidManifest.xml, declare your Activity like so: <activity ... android:screenOrientation="landscape" .../>
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 have 2 projects React web app, one for the desktop site, one for the tablet site. Shared backend, the logic is almost the same but the UI, function and route are separate.
Now I want to combine them into one project, just run only command npm start.
Assuming that the big screen will be the desktop site, the medium screen will be the tablet site.
Similar behaviour to Facebook Tiktok, they have a responsive UI for PC and can switch with the mobile-like UI if access from the tablet.
Try adding a hook like this and include the desired component depending on screen width
How to add navigation drawer to the nativescript android app. I am developing android application using native script in visual studio and javascript template.
I couldn't add navigation drawer to the application. I tried copy pasting the NEXT sample app for the side bar portion, but couldn't get it building. I am facing issue for the same.
Please help me out. Any suggestions and leads will also be of great help.
Thanks in advance.
The sidebar, which they're using in the example, is a (payed) controller from Telerik. As such, it needs to be payed for, downloaded, and added to your project.
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
http://developer.android.com/design/building-blocks/tabs.html#scrollable
Has anyone achieved this effect in a web app using JavaScript (or even jQuery)?
Got the pages sliding nicely (obviously that's the easy part), but getting the page titles to animate correctly looks like it could be painful!
May just go with the fixed tab layout but if anyone has any tips or examples, I would be very grateful...
There's a CSS which makes your page look like Android:
https://github.com/proimage/Android-4-ICS-CSS
There's a more advanced project with some JS:
http://jaunesarmiento.me/fries/index.html
And this is the way to do page swiping:
http://stereobit.github.io/dragend/ (also works on the PC)
http://swipejs.com/ (only works on touch device)
http://eightmedia.github.io/hammer.js/ (only triggers the event, doen't swipe the page)
With these you can have multiple pages in one HTML file:
http://handlebarsjs.com/
https://github.com/janl/mustache.js
http://underscorejs.org/
http://embeddedjs.com/
http://jade-lang.com/
https://github.com/blueimp/JavaScript-Templates
I'm working myself to combine some of these libs into a usable application. Hope it helps. This is also a note to myself.