- This topic has 2 replies, 2 voices, and was last updated 10 years, 1 month ago by mobio9471.
-
AuthorPosts
-
mobio9471MemberHi,
when I touch a text input on my App, the keyboard appears. Sometimes with the input field on the top (which is the expected behaviour ) and sometimes it covers the input field so that I can not see, what I type (I dont understand this behaviour)
What I need is to get the touched input field always on the top of the keyboard.
How can this be accomplished ?
Any suggestions ?
Samsung Galaxy S2 Android 2.3.3
support-octavioMemberHi mobio9471,
This is a known issue on android where the keyboard goofs up the layout of form fields (see 3.1.10 in release notes). We have isolated the problem down to an android issue when there is a scroller on the screen or there is a textfield near to the bottom. One approach that may improve the keyboard/layout experience is to eliminate the need to scroll the UI to view all form fields. Here is how to accomplish this:
1) layout your UI such that all form fields fit on the smallest size display that you anticipate the app running on without needing to scroll the screen
2) do not enable a vertical scrollbar on the screen with the form fields
3) when you build a native app set the orientation that does not require scrolling to view the form fields, e.g., portrait
mobio9471MemberHi octavio,
thank you very much for your reply 🙂
It helped my very much !From my point of view this problem is caused only by selecting vertical scrolling active (point 2.).
Without scrolling it works as expected.I decided to overcome this problem by not rely on android to do this shifting for me. I created my own mechanism
For people having the same problem I will describe my approach shortly– create a custom html-widget in the designer that contains a text input or text area (html)
– make sure that it is located as a child of the page in the html hierarchie
– use jquery to set position:fixed , left , height, width, background-color , etc. as desired. Use position:absolute for all html elements contained in the custom html-widget. This will give you full control on the layout.
– set the css properties dynamicly using javascript+jquery . this gives you full control on behaviour.
– if the custom html-widget will destroy your layout set in the designer the height to 0. that worked for me.thats the almost perfect solution for my purposes. “Almost” because there is one issue that does not work as desired.
The “only” problem I have, I will discuss in a new post named “no on-back event when keyboard active”
-
AuthorPosts