[ https://issues.apache.org/jira/browse/FLEX-33211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464037#comment-13464037 ]
Mike commented on FLEX-33211: ----------------------------- After further analysis, I think this might be a bug in AIR. The StageText class is not raising a SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE event when stage.focus is set to null. The following app demonstrates the problem. package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.KeyboardEvent; import flash.events.SoftKeyboardEvent; import flash.geom.Rectangle; import flash.text.StageText; public class SoftKeyboardSpike3 extends Sprite { public function SoftKeyboardSpike3() { super(); // support autoOrients stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; var stageText:StageText = new StageText(); stageText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE, softKeyboardActivate); stageText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, softKeyboardDeactivate); stageText.addEventListener(flash.events.KeyboardEvent.KEY_DOWN, keyDown); stageText.addEventListener(flash.events.KeyboardEvent.KEY_UP, keyUp); stageText.viewPort = new Rectangle(0,0,100,40); stageText.text = "text"; stageText.returnKeyLabel = "go"; stageText.stage = this.stage; stageText.visible = true; stageText.assignFocus(); } private function softKeyboardActivate(e:Event):void { trace("softKeyboardActivate"); } private function softKeyboardDeactivate(e:Event):void { trace("softKeyboardDeactivate"); } private function keyDown(e:flash.events.KeyboardEvent):void { trace("keyDown" + e); e.preventDefault(); } private function keyUp(e:flash.events.KeyboardEvent):void { trace("keyUp: " + e); e.preventDefault(); stage.focus = null; } } } 1) Start the app. 2) Touch the StageText object so that it gains focus and the soft keyboard is displayed. 3) Touch the "go" key. The result is that softKeyboardDeactivate is not called. I expect it to be called as it is on iOS. > [Android]: View does not resize after soft keyboard dismissal when > resizeForSoftKeyboard=true > --------------------------------------------------------------------------------------------- > > Key: FLEX-33211 > URL: https://issues.apache.org/jira/browse/FLEX-33211 > Project: Apache Flex > Issue Type: Bug > Components: Mobile: SoftKeyboard > Affects Versions: Adobe Flex SDK 4.6 (Release) > Environment: Flash Builder 4.7 beta > Flex 4.6.0 > AIR 3.4 > ASUS Transformer (Android 4.0.3) > Reporter: Mike > Labels: android, resizeForSoftKeyboard > > On Android when resizeForSoftKeyboard=true, the view does not resize after > dismissing the soft keyboard. This simple app demonstrates the bug. > <?xml version="1.0" encoding="utf-8"?> > <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" > applicationDPI="160" > resizeForSoftKeyboard="true" > applicationComplete="applicationComplete()"> > <fx:Script> > <![CDATA[ > private function applicationComplete():void { > keywordTextInput.setFocus(); > } > private function keywordTextInputEnter():void { > stage.focus = null; > } > ]]> > </fx:Script> > <s:Rect id="rect1" width="100%" height="100%"> > <s:stroke> > <s:SolidColorStroke color="#FF0000" weight="4"/> > </s:stroke> > </s:Rect> > <s:TextInput id="keywordTextInput" enter="keywordTextInputEnter()" > returnKeyLabel="go"/> > </s:Application> > 1) Start app. > 2) Click on the "go" button on the soft keyboard > I observe that the red rectangle remains the same size (about half the > screen). I expect the red rectangle to resize to fill the entire screen as it > does on iOS. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira