This feels like a dumb newbie question. I'm attempting to follow the Palm's online tutorial for developing a webOS app. I ran palm-generate and tried updating the generated index.html file to have a body with a bunch of content (the word "HELLO" repeated 400 times).
When I attempt to load that document in the emulator, I find that I'm unable to scroll the screen to read the rest of the text. I drag the screen, but nothing happens. The page scrolls just fine in the Palm web browser.
Is there a setting to allow users to drag my app to scroll it? I see documentation for a Mojo.Widget.Scroller, but that seems like it shouldn't be necessary for a simple web page with a bunch of text on it.
Thanks to arthurthornton:
You can take anything that would normally be inside the tags and put that inside the scene HTML file.
OR you could just make a basic scene with a webview widget inside it that has your site as the source.
Unfortunately, the Scroller widget is needed for scrolling. The standard WebKit view that's shown in a card has no native scrolling ability, so the Mojo scroller widget implements the logic for displaying more content that can fit.
You can try this out by making a new project in the Ares IDE. Just add a Scroller and use the Maximize button to make it fill the scene. Then, add a HTML object to it, and add your HTML content to that object. You'll then have a nice scene which allows you to scroll through a lot of content.
Related
I have a Mac app that displays info in a WebView. Quite an old app now and in Objective-C which I am rapidly forgetting.
The WebView contains anchor tags to allow navigation within the pages, both by clicking on links in the page displayed, or by clicking tabs in the UI which send Javascript to the WebView. In High Sierra this no longer works although it displays no error.
It appears that I need to implement isKeyExcludedFromWebScript: but my attempts to do so have failed.
Do I need to sub-class WebView? Putting isKeyExcludedFromWebScript: and isSelectorExcludedFromWebScript: in the View Controller containing the WebView doesn't work - they never get called.
If anyone has any advice or examples, I would be most grateful.
I am afraid that the answer will be to upgrade the app to use WKWebView but I was hoping for a quick work-around until I get time to do that.
Answering my own question here as I have worked out a solution.
The problem was that I was loading an HTML string into the WebView and when I tried to use internal navigation links, it didn't have a base URL to use as a prefix and so the anchor navigation never worked.
It used to work, prior to High Sierra, so there must be something new about how WebViews operate.
The solution was to save the HTML string to a temporary file and have the WebView load that file's URL instead of loading the string directly.
This applies to both WebView and WKWebView.
I have a form that includes a Xamarin.Forms.Maps.Map control. When I push new views onto the stack with await Navigation.PushAsync(page), views that I want to be modal (using await Navigation.PushModalAsync(page)) that I push onto the stack are empty. The animation works fine, but what's animated is just empty (the background is white but with no controls or other UI elements rendered. If I remove the map control from the "root" view, the modal pages are displayed correctly. If I use .PushAsync instead of .PushModalAsync the views are displayed correctly.
I am targeting Android 6 using the Google emulators
I have no idea what's going on.
it looks like we have a bug on the Xamarin Forms ModalNavigation. It was already reported here: https://bugzilla.xamarin.com/show_bug.cgi?id=43692
For now, I'm using this workaround (from Scott Simms): before pushing a any page (in the OnDisappearing()) from a page that contains a MapView, remove the MapView from the Content of current page, and load it again in the OnAppearing();
It works well for next page BUT... if you push a new wrapped ModalPage on this second page, when you pop it, probably it will crash your app too.
It has been bothering me, and I am thinking about implement my own toolbar to make it looks like a Navigation Page and avoid the annoying crashing.
I would like to develop some animations for my pages or my page content. The approach of which one I should follow is unclear to me at the moment and I'll try to explain why.
What I'd like to achieve is to create a page (or page content) animation with a slide-in from right when navigating to the page and slide-out to left when leaving the page.
The slide-in part can be achieved with ContentThemeTransition from TransitionCollection. But what about the slide-out part?
I can't seem to know or find any good timing regarding when to fire a slide-out animation just before the page is about to be left.
I'dlike not to apply any animation to the page in such way that WP does by default (with some jump-out, jump-in effect). I'd like to be like BasicPage from templates with no animation but with custom animated content upon page enter and page leave.
How could this be achieved?
Thanks in advance.
I assume you are navigating from the page via tapping a button or something similar. Why don't you create a storyboard animation, start that from the Click event handler of the button, and call Frame.Navigate() when the animation has finished playing?
I've tried so many links and they all revert back to a web view.
I only just got Xcode and I'm pretty new to all this stuff, its complete different to C and Java.
Anyways, I have added a scroll view to my frame and gave it a class I've made myself (hopefully that works).
Now, when I load the application, I want it to be able to load a webpage (my blog) into the scroll view
any idea how?
Regards,
Ryan
You need to use a UIWebView for loading web pages. The scroll for UIWebView would automatically adjust according to the size of the webpage.
I have a web app I'm building in Dashcode, currently every thing is working as advertised. I'm using the browser template and was able to modify it a bit, got the xml working to connect images and their description. Now I want to add a simple OnClick event that sends the image to fullscreen but I can't find any documentation for that. I'm pretty sure this is easily done so I'm missing something here? Any help greatly appreciated.
Tom
Taking over the screen is a bit complicated (if your talking about a full screen experience like youtube), but full screen in the browser window is defiantly possible. The simplest method is to have the click event open a link to the image location. This would load the image in full resolution in the browser window. A more elegant approach would be to load the image url into the source of a image dashcode object. and have that objects visibility only appear overs the whole web app when the Oncick event occurs. If you are talking about a built in function in dashcode to achieve a full screen/browser image, your out of luck.