15.10.2012 Views

Actionscript 3 Entwicklerhandbuch

Actionscript 3 Entwicklerhandbuch

Actionscript 3 Entwicklerhandbuch

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ACTIONSCRIPT 3.0 ENTWICKLERHANDBUCH<br />

Tastatureingabe<br />

}<br />

textField.width = this.stage.stageWidth;<br />

private function onKeyboardChange( event:SoftKeyboardEvent ):void<br />

{<br />

var field:InteractiveObject = textField;<br />

var offset:int = 0;<br />

//if the softkeyboard is open and the field is at least partially covered<br />

if( (this.stage.softKeyboardRect.y != 0) && (field.y + field.height ><br />

this.stage.softKeyboardRect.y) )<br />

offset = field.y + field.height - this.stage.softKeyboardRect.y;<br />

}<br />

}<br />

}<br />

//but don't push the top of the field above the top of the screen<br />

if( field.y - offset < 0 ) offset += field.y - offset;<br />

this.y = -offset;<br />

Hinweis: Unter Android sind die genauen Abmessungen der Tastatur in bestimmten Situationen nicht vom<br />

Betriebssystem abrufbar. Dies ist beispielsweise im Vollbildmodus der Fall. In diesen Fällen wird die Größe geschätzt. Bei<br />

der Ausrichtung im Querformat wird die native IME-Tastatur im Vollbildmodus für jede Texteingabe verwendet. Diese<br />

IME-Tastatur hat ein integriertes Texteingabefeld und verdeckt die ganze Bühne. Es gibt keine Möglichkeit, eine Tastatur<br />

im Querformat anzuzeigen, die nicht den ganzen Bildschirm ausfüllt.<br />

Letzte Aktualisierung 27.6.2012<br />

608

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!