Page 1 of 1
the button does not respond when keboard is Activated
Posted: Sat Jan 24, 2015 2:50 pm
by zhanghuanqian
dear sir:
my app worked perfect except that after i input something into TextEntry field with keyboard Activated , the button "Submit" does not respond when i press it. what can i deal with this issue?
environments:
lc community 7.0.1 rc4+win7
standalone settings:minimum android version:3.1
sumsung mobile:android4.2.2
thanks!
Re: the button does not respond when keboard is Activated
Posted: Mon Jan 26, 2015 1:41 pm
by MaxV
Do you use a native android text field?
Re: the button does not respond when keboard is Activated
Posted: Tue Jan 27, 2015 1:31 pm
by zhanghuanqian
how can i create a native field? i create the field which is on the "Tools" panel near the "Label:",the tooltip named "TextEntry Field".
i search a result here: lessons*runrev*com/m/4069/l/29112-how-do-i-use-native-text-controls-on-mobile
but i cannot understand it.
Like this:
1.create a ractangle,named InputRect
2.create a input via
mobileControlCreate "input", "testinput"
mobileControlSet "testinput", "rect", the rect of graphic "InputRect"
mobileControlSet "testinput", "visible", true
and what other codes should i have?
thanks
Re: the button does not respond when keboard is Activated
Posted: Tue Jan 27, 2015 2:35 pm
by zhanghuanqian
by the way,the issue take place that all the controls on the card moved up automatically when keyboard is shown and Activated, then the button does not respond which is near field.
the fig is below:
Re: the button does not respond when keboard is Activated
Posted: Tue Jan 27, 2015 4:43 pm
by MaxV
A native Android control is generated by Android and not by Livecode, it responds better to Android.
It's just like an external object over your livecode app, but it works great on Android.
Please read mobileControCreate and mobileControlSet in the dictionary.
Every field where the user has to type should be a native field in Android.
Re: the button does not respond when keboard is Activated
Posted: Wed Jan 28, 2015 1:05 am
by zhanghuanqian
thank you,MaxV.i will try later!
Re: the button does not respond when keboard is Activated
Posted: Wed Jan 28, 2015 1:21 am
by Simon
Hi zhanghuanqian,
all the controls on the card moved up automatically when keyboard is shown
If you turn off accelerated rendering this will stop, but then you will have to position the controls via code because the keyboard may cover the active field.
Simon
Re: the button does not respond when keboard is Activated
Posted: Wed Jan 28, 2015 6:45 am
by zhanghuanqian
oh...
i have used the code: set the acceleratedRendering of this stack to true
but i have tryed to deal keyboardactivated message with almost all approachs:
1.
http://forums.livecode.com/viewtopic.ph ... ard#p43233
2.
http://forums.livecode.com/viewtopic.ph ... ht#p114468
3.http:\\lessons*runrev*com/m/847/l/136724-move-a-native-mobile-text-input-control-so-it-is-not-covered-by-keyboard
and i fail.
what can i do? how can i get the height of keyboard? by the property of working screenRects?
thanks!
Re: the button does not respond when keboard is Activated
Posted: Wed Jan 28, 2015 12:59 pm
by MaxV
Looking to your picture, I assume that there are 2 fields (named "V(A)" and "longtext"), so I would add:
Code: Select all
On OpenCard
if the environment is "mobile" then
mobileControlCreate "input","V(A)"
mobileControlCreate "multiline","longtext"
mobileControlSET "V(A)","visible",true
mobileControlSET "longtext","visible",true
mobileControlSET "V(A)","rect",(the rect of field "V(A)")
mobileControlSET "longtext","rect",(the rect of field "longtext)
mobileControlSET "V(A)","keyboardType","numeric"
end if
End OpenCard
on CloseCard
if the environment is "mobile" then
mobileControlDelete "V(A)"
mobileControlDelete "longtext"
end if
end Closecard
Re: the button does not respond when keboard is Activated
Posted: Thu Jan 29, 2015 6:57 am
by zhanghuanqian
thanks everyone!
and how can i get the height of keyboard?
and the property:acceleratedRendering has a bug? when it set and move all controll(s) up and then can't press button.