I user LayoutPanel in the GWT view and each time i press the TextBox the Keyboard appears and squeezes the view.
on android this happens and on ios it doesnt.
i want to keep the height in proportions to the view original height...
thanks
You have two options:
A. On resize event in this view, check if user agent is Android. If it is, force the size not to change.
B. Create a different view for Android devices, and then use GWT's deferred binding to substitute your view class if user agent is Android:
https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsDeferred#replacement
This is a another good post:
http://code.google.com/p/google-web-toolkit/wiki/ConditionalProperties
Related
I am trying to replicate Mail.app behaviours in my app. If you have multiple e-mail accounts and select a random e-mail for each account and switch between each account from the sidebar, the app remembers your scroll position and which e-mail you selected and display them accordingly. That is what I want in my app.
I know how to preserve the row selection, that is easy. tableView.selectedRowIndexes
My tableView has multiple data sources and switches (tableView.reloadData()) accordingly from the sidebar.
I am having a major problem with the scroll position. I tried looking into NSScrollView, NSClipView and NSTableView. It seems to me that there are scrolling mechanism for each view.
I need to remember the scroll position when the user scroll for each data source
I need to load the previous scroll position when the user return to the data source
Also a strange behaviour I noticed is when reloading tableView to a different data source, it seems to persistently remember from the previous data source scroll position. Is that normal? I assumed it would reset to the top.
My data sources are arrays which are my NSViewController subclass properties.
If it matters, I am using storyboard, my app is targeting Big Sur and I am using Swift.
The position to save:
preservedPosition = tableView.visibleRect.origin
Restore:
tableView.scroll(preservedPosition)
I am testing my app on HTC One M8 running Android version 5.0.2. When an input field in the app loses focus, a white background is shown after the keyboard closes.
My background image is set on .scroll-content, so I don't understand why it acts like this on Android.
Check your ionic pane colour and view colour. You have different background colour so in the keyboard adjust pane mode the view gets resized (height-keyboard height) so when the keyboard goes off it shows the ionic-pane colour. So override the '.pane' background colour and see will it make any difference.
keyboard adjustment will work only if '.scroll-content' is present. By default ionic-content will enable this
The issue is that when we open a keyboard in our current application the app gets resized to the area that is left after opening the keyboard and the Cordova webview is too slow in resizing the app back to its normal size after the user closes the keyboard. There is no proper solution to this problem.
The most elegant working workaround for is to stop resizing the application on keyboard open. The keyboard will just slide up and down on the form as an overlay and there will be no resizing required.
In AndroidManifest.xml file try to set windowSoftInputMode attribute to adjustNothing:
android:windowSoftInputMode="adjustPan"
This is not a solution and can be considered as an option for small forms but it is not suitable for big forms.
I want give user the possibility to change some option. So if one touch on a "button" element build by touchevents and SKLableNode, I want to open a smaller modal view with close and other buttons. Has anyone an Idea?
Thanks.
I've been struggling with this for several days. I have a very simple page in my mobile app with a textarea input and when I click on it the soft keyboard appears and scrolls the header of my page out of view. Is there a way to prevent this default scrolling?
Your is the default functionality of Phones, When user completes typing the screen automatically scroll backs, Kindly check it, If it works please reply.
On this site : mecanomedic.com, the menu template work fine in "normal" desktop browser, but dont slide down on ipad-iphone device. What can be the problem ?
Some tell me it's a css problem, but HOW safari desktop work ?
The problem is that the menu expansion relies on the user hovering with a mouse. On touch devices like iPads & iPhones, the hovering gesture can't be replicated because there's only one input- touch. If I were you, I'd take a look at Twitter's Bootstrap menu setup and perhaps use media queries to serve up a different menu on smaller screen sizes.
Here's an example of a Bootstrap navigation bar in action (you'll have to inspect the code to see how it works).
Add a href to the top-level <a>'s so that they can be focusable:
Produits
Elements that are focusable receive mouse events and hover styles when the user taps on them.
As #Matt stated, the problem is that your menu relies on a hover event and unfortunately that event is unavailable on touch screen devices.
One way to fix this would be to:
Check if the current user's device is an iOS device
If the device is an iOS device, use javascript to trigger a menu item's "show event" when the menu button is CLICKED instead of ROLLED OVER / HOVERED.
This would result in the menu being shown when the user taps a menu button.