Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

TextArea auto focus keyboard Android

$
0
0

I have a two part question, First I've created a text area on my app that works great except that in Android the keyboard automatically shows when the window is launched. I've found workarounds that others have listed but nothing for alloy. I am new to all the app design so I'm not so good at translating the old way of doing things to alloy. Can someone please help?

My second question I added a onWinClick with a blur function so that when someone clicks off the text area the keyboard goes away. However, what I've noticed is that it does hide the keyboard but when I recheck on the text area the keyboard is very slow to open or some times just flashes and disappears. How would I fix this?

xml:

<Window id="win1" title="Assistance" class="redBack" onClick='onWinClick'> <ScrollView> <View id="request"> <Label id="title">Truck CPR</Label> <ImageView id="logo" image="/images/logo_03.png" /> <Label id="assist_win">Problem Description:</Label> <TextArea id="textArea1" /> <Button id="request_btn" class="greenButton" onClick="doClick" title=" Request Assistance " /> </View> <View id="dispatched"> <Label id="dispatch">Dispatch Contacted:</Label> <Label id="eta">The dispatched technician's ETA is 1:42pm</Label> <Button id="dispatch_btn" class="greenButton" onClick="doClick" title=" Call Dispatch " /> <Button id="cancel_btn" class="blackButton" onClick="doClick" title=" Cancel " /> </View> </ScrollView> </Window>

js:

function onWinClick(e) { $.textArea1.blur(); $.textField2.blur(); $.textField3.blur(); };


Viewing all articles
Browse latest Browse all 8068

Trending Articles