Page 1 of 5

Keyboard covers text field when typing

Posted: Mon Aug 26, 2013 11:37 pm
by ECNU4271
Hi all,

When user wants to type, the keyboard goes up and it occupies half of the screen which will cover some text fields users may want to type.

That makes users blind on what they are typing.

Is there good way to solve problem?

I do think it's a common one so there should be someone who has asked this before. :D

Thanks!
Michael

Re: Keyboard covers text field when typing

Posted: Mon Aug 26, 2013 11:41 pm
by Simon
Hi Michael,
Again it's get the effective working screenRect
Please look screenRect in the dictionary and then try it when the keyboard is up.

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:19 am
by ECNU4271
Simon wrote:Hi Michael,
Again it's get the effective working screenRect
Please look screenRect in the dictionary and then try it when the keyboard is up.

Simon
Hey, Simon

Thanks, I've looked up screenRect in the dictionary

I tried:

Code: Select all

on openCard
set the rect of this stack to line 9 of the working screenRects
end openCard
Somehow it doesn't work.
What will be the correct way to use the command anyway?

Michael

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:24 am
by Jellicle
Ignore screenRects. You have to implement a way for the fields to move upwards when the keyboard is visible. There are a few ways of doing that depending on how many fields there are and how high they are. Can you tell us more about the layout of the fields on the screen?

Gerry

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:26 am
by ECNU4271
Hi, Gerry,

There will be 6 fields up to down across the screen averagely.
The keyboard occupies about 40% of the screen.

Michael

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:26 am
by Simon
errr Gerry,
effective working screenRects tells you how far you have to move the field. :)

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:29 am
by Simon
And Micheal,
You can't set the screenRect on mobile.

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:32 am
by ECNU4271
Simon wrote:And Micheal,
You can't set the screenRect on mobile.

Simon
Then what should I do?

Any easy way to do it? Because I only have little time before Deadline and if it doesn't work I would just leave it there as future improvement.

Michael

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:42 am
by Simon
Well if you have the effective blah blah and you group your field into a scrolling group you can set the vScroll of the group.
Fun!

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:46 am
by ECNU4271
Simon wrote:Well if you have the effective blah blah and you group your field into a scrolling group you can set the vScroll of the group.
Fun!

Simon
Well, Simon...
It seems I am not able to do that....
Could you please teach or show me to some extent?

Thank you,
Michael

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 12:52 am
by Simon
Maybe I should have done this:

Code: Select all

get the effective working screenRect
answer it
Put that into 1 of your fields, I see you know textChanged so put it in that.
Also add a button that you can use when the keyboard is not showing and put the code into that. See the difference?

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 1:16 am
by ECNU4271
sorry Simon, I was busying coding other functions of my app and forgetting you're waiting... Sorry!!

Let me try it now

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 1:20 am
by Simon
Actually I'm not waiting for you.
I don't work here.

Simon

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 8:23 am
by Jellicle
Simon wrote:Maybe I should have done this:

Code: Select all

get the effective working screenRect
answer it

Putting that in a button on a card where the keyboard is used with native input controls I get "0,40,640,920" when it's visible, and "0,40,640,1136" when it isn't (for an iPhone 5 screen).

Is that the expected behaviour? If so...it's wrong :) The rect of the area still visible above the keyboard is smaller than "0,40,640,920" :)

Gerry

Re: Keyboard covers text field when typing

Posted: Tue Aug 27, 2013 8:48 am
by Simon
Well that's cool that you could measure it!
Are you adding the title bar?

Simon