Codename One screen shrinkage [duplicate] - codenameone

This question already has an answer here:
CodenameOne: VKB changes the screen
(1 answer)
Closed 6 years ago.
I have a form with two texfields. Once one of the textfields get focus and the virtual keyboard is launched, the form/screen is shrinked and the controls are pushed up. Is there a way to counter this?

When you have text fields inside a container one of the parents must be scrollable.
At this time Android shrinks the screen to make room for the virtual keyboard but if the screen is scrollable this shouldn't be an issue. Notice that on iOS the screen isn't shrunk but scrollability is increased to leave room for the keyboard so you need that anyway.

Related

How to create a form with blurred background and a sharp panel inside it? [duplicate]

This question already has answers here:
Dimming inactive forms
(3 answers)
Closed 8 years ago.
When you set the opacity of the form it will affect all of it's child controls. Now I need exclude my panel inside the form from it.
The ultimate goal is to make a dialog box with a blurry background.
Make a separate dialog box, and float it over the blurred form.

iOS7 shifts entire safari view

I'm seeing some odd behaviour in iOS7 with my app that only demonstrates in iOS7.
When the keyboard comes up from the bottom it pushes the screen up to focus the input box. After the keyboard is dismissed a grey space remains where it was, leaving the rest of the window pushed up. Images below will demonstrate what I'm saying.
I'm using Sencha on this webapp.
While the images show the split keyboard, this occurs for both split and non-split keyboards
I can swipe down in the grey space to bring the rest of the view back onto the screen, but that isn't a solution.
What is the cause of this behavior and how can I avoid it?
Below is a slightly modified email that I sent out describing the cause of this:
After seeking an answer for our keyboard issue but coming up empty handed I think I figured out what is going on. It seems to be related to a bug in iOS 7.
Take a look at the attached ‘normal_behaviour.jpg’ file. This shows what the split keyboard looks like from iOS 6 to iOS 8. The input field I had selected on the Apple website was near the top of the page. When I touched it the web page slid up very slightly to ensure that the input field was still visible.
In the attached ‘unwated_behaviour.jpg’ file I found an input field close to the bottom of the screen and selected it. On both iOS 6 and iOS 8 the keyboard covers the input filed, however on iOS 7 the entire webpage is slid up so you can see the input field, which is great from a user friendliness perspective, but then when the keyboard is dismissed that grey area where the keyboard was remains, and the rest of the webpage does not slide back into place.
Also of note is that once you select an input field near the bottom of the page with a split keyboard you are able to slide beyond the end of a webpage in any other website you bring up within the same Safari session. You can see a few examples of it in ‘buggy_behaviour_other_pages.jpg’.
Of course with our app we are really using a Safari webview to display pages so we are vulnerable to the same issue when using the Split keyboard. The issue does not present itself with the full keyboard.
Unwanted behaviour.jpg
++++++++++++++++++++++++++++
Normal behaviour
++++++++++++++++++++++++++++
Buggy behaviour other pages

Horizontal scroll inside WP7 pivot page [duplicate]

This question already has answers here:
How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit
(3 answers)
Closed 2 years ago.
I'm having problems with horizontal scrolling inside Pivot control in WP7. I have a Grid with ScrollViewer and ten or more buttons inside. Since all buttons don't fit on the screen i need to be able to horizontally scroll. But when i click and drag on buttons the whole Pivot page starts moving and eventually switches to next pivot page. (buttons inside ScrollView also scroll but only for short distance)
Can I somehow disable Pivot page switching when I click inside ScrollView?
It's not a good idea from a user experience perspective to have a horizontal scroll on top of a control that also slides horizontally. I don't know how you'd go about absorbing the manipulation events within the scroll viewer, without affecting the pivot control but, personally, I would rethink the design. Could your ScrollViewer scroll vertically instead, or possibly on another page, but is accessed via the Pivot control?
I want you to re-evaluate your User experience on this UI since that is not a recommended experience as per the Guidelines. Recommend to consider Panorama control for such a case you referring above.
Solution: http://blogs.msdn.com/b/luc/archive/2010/11/22/preventing-the-pivot-or-panorama-controls-from-scrolling.aspx?wa=wsignin1.0
I use this for Slider in Pivot and Pivot in Pivot

How to detect that WPF window has been snapped in Windows 7

Windows 7 has the snapping feature which 'snaps' a window to the edges, and changes the one dimension of the window size to match the same dimension of the screen, and then choses another size for the other dimension.
I want to detect that it has happened so that in my WindowStyle.None window with custom chrome, I can implement the proper behavior for double clicking the titlebar.
The snapping does not alter the WindowState, so I cannot detect that it has happened. Since only one dimension of window is set to match the the screen, I can not distinquish between a snapped window and a user resized window. Does Win7 send out a specific message, or include a flag in the WM_xxxx messages when it causes a resize? Is the formula to the other dimension (not the one matching the screen) defined anywhere so that I can check if both dimensions match that of a snapped window?
have you tried using spy++ to watch window messages to see what gets sent in what order? maybe there's an extra mesage in there that windows is using.

Is there a declarative way to force a set of Buttons to be the same size? [duplicate]

This question already has answers here:
Evenly-sized buttons according to content of largest button
(3 answers)
Closed 8 years ago.
I'm writing a form in XAML that has multiple buttons with content of different sizes (ie "OK" and "Save As...") Ideally, I'd like them all to be the smallest size possible to hold the largest content. In the example above, both buttons would be the width necessary to hold "Save As..." plus the margins and padding.
If they were Grid cells, I could use a SizeGroup. Is there a similar declaration for Buttons?
If the button labels are known ahead of time, then you could create a style that the buttons could all use, and just set the width property on that.
Otherwise, I think a custom container wouldn't be difficult at all to do for this job. Just subclass whatever container you are using, and manipulate the widths of its child elements. That doesn't sound hard at all.
If there is, I've not heard of it. Unless someone else knows better, one approach would be to create a container object that automatically sized it's contents for you. It's probably not worth the overhead. Alternately, you could edit the layout in Blend which is designed to make that sort of thing easy.

Resources