Adjust WinRT WebView content to control - webview

im trying to fit a Facebook likebox in a webview on a Windows Store APP.
I have done it fine on Android and IOS, just setting the likebox url as html string to the webview.
But in WinRT it shows the box on the upper left corner and A LOT of white space, so the box is really small, i can zoom in to fit it well by hand.
Android and IOS just fit the box in the webview.
Is there any way i can fit it well? also i need to disable user scroll, i only want the user to be able to click the like button.
Thanks in advance.

Related

Resizing JavaFX WebView

I'm attempting to embed a WebView into a BorderPane as it's middle component. My app starts initially in an unmaximized mode. If I maximize the application, the webview will resize accordingly, but the html & css content will not fill the whole area (it is centered in the WebView). How would I go on fixing this? I've tried to call impl_reapplyCss() and friends, but nothing seems to help.

Dojo mobile ScrollableView not scrolling on blackberry when using mouse

I'm using dojo 1.9.2 and have developed a mobile browser app.
The app works fine on iOS and Andriod, but the Blackberry is an issue.
All my pages consist of a dojox/mobile/ScrollableView with very basic content (RoundedRectlist, and RoundedRect as examples)
The problem is that all the content that needs to scroll, only scrolls with the touch events, and nothing happens when the user uses the "Blackberry Mouse".
Device I'm testing on:
** Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.296 Mobile Safari/534.11+ **
Can anybody please tell me how to make this work?
I guess that by "Blackberry mouse" you refer to the trackpad that was present on models such as BB Torch 9860.
I think the key thing here is that, per design of these devices, the swipe gesture using the trackpad serves a different purpose: performing browser scroll at the level of the entire page. You can see such scroll active using the trackpad when the page is overflowing the screen size. Differently, the scrolling at the level of dojox/mobile/ScrollableView often concerns only part of the screen (the remaining being for instance headers and/or footers), and there can even be more than one scrollable area inside the page. Hence, it wouldn't be practical to scroll them using the trackpad, since it would first require to identify the element which should scroll - for that you'd need to click it, which may wrongly trigger a button action for instance.
Try for instance to scroll using the trackpad on this BB sample page: http://blackberry.github.io/WebWorks-Samples/kitchenSink/html/css3/overflow.html. It contains several scrollable areas, and the trackpad only allows to scroll the entire page, not the individual scrolling elements.
If in your dojox/mobile app you don't need fixed headers or footers, just use a dojox/mobile/View instead of ScrollableView. This way the content can overflow the page size, and you'll be able to scroll the entire page using the BB trackpad.
All in one, I think the behavior you observe is the expected one.

How do you prevent a WebView from cropping the web content?

I thought the content would wrap to fit inside the WebView, but instead the right hand side is clipped off.
Sorry for asking such a noob question (WV should just wrap!).
Wrapping would be done in the HTML5 webpage, as it understands the device(PC or Mobile) and behaves accordingly, for others you need special webpage e.g. (m.facebook.com which acts as interface for mobile and www.facebook.com for PCs).
For displaying the complete screen in single screen webview(scaled down) use the following code
yourWebView.scalesPageToFit = YES;

How to enable horizontal scroll using middle touch button of Blackberry

I developed an app with jquery mobile ,but I want to scroll the content inside using the middle touch button of device. Currently I can scroll the page vertically but not horizontatly.
Try setting your page width to a value above 100%.
Not much else can be done to help you without posting code/what you've tired.

How to determine the dimensions of the iOS keyboard in Mobile Safari

I'm currently trying to create a suggestion UI in a web page targeted at Mobile Safari. The main components are a text box and a scrolling list that is displayed below the textbox that contains the list of suggestions.
To do this I need to 1) determine that the keyboard has shown and 2) determine the size of this in order to resize the suggestion list to fit in the available space.
I've been able to accomplish (1) by waiting for the focus event, but (2) is still problematic. I have not been able to find any way to measure the size of the keyboard as it doesn't seem to impact the window dimensions or anything else that I could think of trying to measure.
Is there anyway to programically determine the size of the iOS keyboard when it is displayed in mobile safari?
Unfortunately, there is no way to calculate the height of the keyboard. None of the window properties change when the keyboard comes up.
To determine that the keyboard is showing, you can use this solution:
iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?
Then you'll need to add a device specific class and use media queries in your CSS along with these classes to style appropriately for device and orientation.
If someone has a better hack, I'd really love to hear about it.

Resources