You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Stuart Thomas <st...@beyondconnect.com.INVALID> on 2016/02/17 20:07:02 UTC

SoftKeyboard and TextField combined

Hey Guys,

For your typical messaging scenario - where the textfield is on top of the softkeyboard as it opens and closes..:

I'm using a combination of softkeyboard events and focus events, with a move effect to make it appear that a textfield is bound to the softkeyboard - but it's a bit clunky.

Has anyone solved this in a more elegant way?  Perhaps an ANE?

Many Thanks,

 -sT

RE: SoftKeyboard and TextField combined

Posted by Stuart Thomas <st...@beyondconnect.com.INVALID>.
Hey Om,

Yes, which works fine when all content (example a login screen) can move, and the text field doesn't need to look as if it's attached to the keyboard (typical messaging app for example). The textfield kinda' drops off screen for a moment, then everything catches up..  So, the workaround is to animate it and try to match the speed/cadence of the opening and closing keyboard and set the softKeyboardBehavior to "none".

Adobe offers some guidance:
http://help.adobe.com/en_US/as3/dev/WSfffb011ac560372f6bc38fcc12e0166e73b-7fff.html

I guess I just need to work on what I've built so far, and improve it..  Shame there isn't a "deactivating" event like there is an "activating" though.

 -sT

-----Original Message-----
From: omuppi1@gmail.com [mailto:omuppi1@gmail.com] On Behalf Of OmPrakash Muppirala
Sent: Wednesday, February 17, 2016 11:24 AM
To: users@flex.apache.org
Subject: Re: SoftKeyboard and TextField combined

Have you used the Mobile TextInput component and set the softKeyboardBehavior attribute in app.xml to "pan"?

Thanks,
Om

On Wed, Feb 17, 2016 at 11:07 AM, Stuart Thomas < sthomas@beyondconnect.com.invalid> wrote:

> Hey Guys,
>
> For your typical messaging scenario - where the textfield is on top of 
> the softkeyboard as it opens and closes..:
>
> I'm using a combination of softkeyboard events and focus events, with 
> a move effect to make it appear that a textfield is bound to the 
> softkeyboard
> - but it's a bit clunky.
>
> Has anyone solved this in a more elegant way?  Perhaps an ANE?
>
> Many Thanks,
>
>  -sT

Re: SoftKeyboard and TextField combined

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Have you used the Mobile TextInput component and set
the softKeyboardBehavior attribute in app.xml to "pan"?

Thanks,
Om

On Wed, Feb 17, 2016 at 11:07 AM, Stuart Thomas <
sthomas@beyondconnect.com.invalid> wrote:

> Hey Guys,
>
> For your typical messaging scenario - where the textfield is on top of the
> softkeyboard as it opens and closes..:
>
> I'm using a combination of softkeyboard events and focus events, with a
> move effect to make it appear that a textfield is bound to the softkeyboard
> - but it's a bit clunky.
>
> Has anyone solved this in a more elegant way?  Perhaps an ANE?
>
> Many Thanks,
>
>  -sT

RE: SoftKeyboard and TextField combined

Posted by Stuart Thomas <st...@beyondconnect.com.INVALID>.
Yes, I found that too, the dimensions can be inaccurate.  Love FreshPlanet - cool of you to share, this is excellent!  Ok, so I'll continue to work on a mixture of speed/cadence/events in order to give the appearance that the textfield is attached - this ANE will certainly help, ty!

Swiping the keyboard with your finger though, now that we can't do.  We can't position the native keyboard, we just know when it's opening/opened/closed.  I wonder if one could control the position of the softkeyboard natively?  If so, then perhaps that's the way to go with an ANE.

Does anyone know if it's possible on iOS or Android to control the position of the softkeyboard?

Thank you!

 -sT

-----Original Message-----
From: Greg Dove [mailto:greg.dove@gmail.com] 
Sent: Wednesday, February 17, 2016 11:28 AM
To: users@flex.apache.org
Subject: Re: SoftKeyboard and TextField combined

I haven't done this specifically, but I have certainly moved input fields to cope with softkeyboard appearance/size, while keeping the app's background static. I am not aware whether what you described exists as an ANE in its own right, but if not, I think you will need an ANE at the very least for accurate soft keyboard dimensions, the softKeyboardRect is not accurate on some devices. I have not used this one, but I have down something similar, and it would probably help for some android devices/keyboard combinations:
https://github.com/freshplanet/ANE-KeyboardSize



On Thu, Feb 18, 2016 at 8:07 AM, Stuart Thomas < sthomas@beyondconnect.com.invalid> wrote:

> Hey Guys,
>
> For your typical messaging scenario - where the textfield is on top of 
> the softkeyboard as it opens and closes..:
>
> I'm using a combination of softkeyboard events and focus events, with 
> a move effect to make it appear that a textfield is bound to the 
> softkeyboard
> - but it's a bit clunky.
>
> Has anyone solved this in a more elegant way?  Perhaps an ANE?
>
> Many Thanks,
>
>  -sT

Re: SoftKeyboard and TextField combined

Posted by Greg Dove <gr...@gmail.com>.
I haven't done this specifically, but I have certainly moved input fields
to cope with softkeyboard appearance/size, while keeping the app's
background static. I am not aware whether what you described exists as an
ANE in its own right, but if not, I think you will need an ANE at the very
least for accurate soft keyboard dimensions, the softKeyboardRect is not
accurate on some devices. I have not used this one, but I have down
something similar, and it would probably help for some android
devices/keyboard combinations:
https://github.com/freshplanet/ANE-KeyboardSize



On Thu, Feb 18, 2016 at 8:07 AM, Stuart Thomas <
sthomas@beyondconnect.com.invalid> wrote:

> Hey Guys,
>
> For your typical messaging scenario - where the textfield is on top of the
> softkeyboard as it opens and closes..:
>
> I'm using a combination of softkeyboard events and focus events, with a
> move effect to make it appear that a textfield is bound to the softkeyboard
> - but it's a bit clunky.
>
> Has anyone solved this in a more elegant way?  Perhaps an ANE?
>
> Many Thanks,
>
>  -sT