StageWebView not resizing after using soft keyboard

Viewing web pages in my Adobe Air app using stageWebView works fairly well. However, whenever I use the soft keyboard to enter data into a text field on a form, after I finish and dismiss the soft keyboard my stageWebView remains resized as it was (automatically) to view the soft keyboard. So it is approx 1/2 of the screen when it should be on the whole screen. And the space where the soft keyboard was displayed is blank. No matter what page I navigate to this situation remains until I force close the app and restart.
How would I fix this?

Hi,I find a way to solve this problem.
Frist ,when you click textinput in stagewebview, you should turn back to flex view. You should setfoucs on a textinput which using by flex. 
Then you can use stagewebviewbriadge which javascritpt can commuicate actionscript each other.You can sent the textinput value using by flex to the textinput using by html.
Here some main code:
   public var webView:StageWebViewBridge;
   public var boxColor:Sprite = new Sprite();
   public function addedToStageHandler()
    initUI()
   protected function removedFromStageHandler():void
    webView.dispose();
    stage.removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,resize1);
    stage.removeEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
   protected function orientationChangeHandler(event:StageOrientationEvent):void
    resizeWebView();
   protected function resizeWebView():void
    webView.viewPort = new Rectangle(5,100,stage.width-10,stage.height-200);
   private function initUI():void
    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
    stage.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,resize1);
    StageWebViewBridge.DEBUGMODE=false;
    StageWebViewBridge.setRootFolder('htmlFiles');
    webView = new StageWebViewBridge();
    webView.stage = this.stage;
    stage_height=stage.height;
    stage_width=stage.width;
    resizeWebView();
    webView.loadURL("http://192.168.1.101/WebForm/Woman.aspx");
    addJavascriptCallBacks();
   private var inputname:String;
   private function resize(str0:String,str:String,str1:String):void
    webView.viewPort = null;
    astext.setFocus();
    inputname=str;
    container.visible=true;
    aslabel.text=decodeURI(str0);
    astext.text=decodeURI(str1);
   private var stage_height:Number;
   private var stage_width:Number;
   private function resize1(e:SoftKeyboardEvent):void
    webView.viewPort = new Rectangle(5,100,stage_width,stage_height-90);
    webView.bridge.call("resizeJS",null,inputname,URLEncodeChange(astext.text,"UTF-8"));
    container.visible=false;
   public function addJavascriptCallBacks():void
    webView.bridge.addCallback("backMain",backMain);
    webView.bridge.addCallback("resize",resize);
   private function backMain(str:String):void
    trace(str)
//    navigator.pushView(LivingPeopleMainView);
   protected function asbtn_clickHandler(event:MouseEvent):void
    // TODO Auto-generated method stub
    webView.viewPort = new Rectangle(5,100,stage_width,stage_height-90);
    webView.bridge.call("resizeJS",null,inputname,URLEncodeChange(astext.text,"UTF-8"));
    container.visible=false;
   public  function URLEncodeChange(p:String,chartSet:String):String{
    var result:String ="";
    var byte:ByteArray =new ByteArray();
    byte.writeMultiByte(p,chartSet);
    for(var i:int;i<byte.length;i++){
     result += escape(String.fromCharCode(byte[i]));
    return result;
  ]]>
</fx:Script>
<s:navigationContent>
  <s:Button label="后退" click="navigator.popView()"/>
</s:navigationContent>
<s:VGroup id="container" visible="false">
  <s:HGroup>
   <s:Label id="aslabel">
   </s:Label>
   <s:TextInput id="astext">
   </s:TextInput>
  </s:HGroup>
  <s:Button id="asbtn" label="确定" click="asbtn_clickHandler(event)"/>
</s:VGroup>
</s:View>

Similar Messages

  • Bug: View does not resize after soft keyboard dismissal

    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.
    My environment:
    Flash Builder 4.7 beta
    Flex 4.6.0
    AIR 3.4
    ASUS Transformer (Android 4.0.3)

    Submitted bug:
    https://bugbase.adobe.com/index.cfm?event=bug&id=3657721

  • Overhead calculation not happening after using Overhead key and orgin group

    overhead calculation not happening after using Overhead key and orgin group.
    There was a runtime error earlier related to u201Cdefine credit u201C IMG node under costing sheet component and we have applied SAP note 769946 and that error was gone out of the way
    We want to apply/add Overhead to SFG/FG materials.
    We are using PP order with PCC(product cost collector) as the cost object , i.e costing by period.(system ECC 6)
    But our problem is with material standard cost estimate process.
    We have assigned overhead keys to the percentage rates in costing sheet for material standard costing and assigned the origin groups to the credits of costing sheet. But after running the cost estimate overhead is not taking into account for standard cost calculation.
    In the define credit entry table key field is valid to date strangly and actually system should allow one than one entry with same valid to date and same sec.Cost element(type-41) for different cost centers.
    But if we without using overhead key and origin group, the entire cost in that supporting cost center will come to all materials (SFG/FG) and we can not distinguish between different product materials(SFG /FG).
    We have checked all things as mentined below.
    Firstly that the correct costing sheet is assigned to the valuation
    variant.
    That the costing sheet is entered for the appropriate material type:
    Finished and semi finished or material components.
    All of the above can be checked and verified via transaction OKKN.
    In addition make sure that the base value maintained is present in the
    costing, for example the base may include an Origin group, is that
    origin group part of the materials being costed?
    Similarly if the base is found and values exist how is the overhead
    rate of the costing sheet set up, is it valid etc.
    And finally do a similar check for the credit.
    we doubt this as a programm error...
    So, request all experts to have ur feedback..

    Dear,
    Check your origin group & material unit of mesaurement is same.
    some time in costing sheet origin group is maintain in different unit & for materail it's maitain in other unit of mesaurement.
    You can see unit of measure for material in Additional data - unit of measure.
    Check BOM component material unit also.
    Check same  unit of measure is maintain in KZS2
    I hope above will useful.
    GOPAN

  • Overhead calculation not happening after using orgin group.

    overhead calculation not happening after using orgin group.
    There was a runtime error earlier related to u201Cdefine credit u201C IMG node under costing sheet component and we have applied SAP note 769946 and that error was gone out of the way
    We want to apply/add Overhead to SFG/FG materials.
    We are using PP order with PCC(product cost collector) as the cost object , i.e costing by period.(system ECC 6)
    But our problem is with material standard cost estimate process.
    We have assigned overhead keys to the percentage rates in costing sheet for material standard costing and assigned the origin groups to the credits of costing sheet. But after running the cost estimate overhead is not taking into account for standard cost calculation.
    In the define credit entry table key field is valid to date strangly and actually system should allow one than one entry with same valid to date and same sec.Cost element(type-41) for different cost centers.
    But if we without using overhead key and origin group, the entire cost in that supporting cost center will come to all materials (SFG/FG) and we can not distinguish between different product materials(SFG /FG).
    We have checked all things as mentined below.
    Firstly that the correct costing sheet is assigned to the valuation
    variant.
    That the costing sheet is entered for the appropriate material type:
    Finished and semi finished or material components.
    All of the above can be checked and verified via transaction OKKN.
    In addition make sure that the base value maintained is present in the
    costing, for example the base may include an Origin group, is that
    origin group part of the materials being costed?
    Similarly if the base is found and values exist how is the overhead
    rate of the costing sheet set up, is it valid etc.
    And finally do a similar check for the credit.
    we doubt this as a programm error...
    So, request all experts to have ur feedback..

    Dear,
    Check your origin group & material unit of mesaurement is same.
    some time in costing sheet origin group is maintain in different unit & for materail it's maitain in other unit of mesaurement.
    You can see unit of measure for material in Additional data - unit of measure.
    Check BOM component material unit also.
    Check same  unit of measure is maintain in KZS2
    I hope above will useful.
    GOPAN

  • Battery is not charged after using all of my battery. what's wrong? is it about charge machine or my computer?

    battery is not charged after using all of my battery. what's wrong? is it about charge machine or my computer?

    battery is not charged after using all of my battery.
    Of course it isn't — you've just drained it. Plug your AC adapter in and charge it up again.

  • Thumbnails do not display after using rebuild tool

    I am using OSX 10.7.5, and iPhoto 8.1.2.
    recently I made a back up copy of my files.
    I then reinstalled my operating system.
    I then copied my iphoto library back onto my computer.
    imported my iPhoto library into iPhoto
    Pictures are in iPhoto.
    Thumbnails do not display.
    I have used the rebuild tools provided by iPhoto.
    Still no thumbnails displaying.
    any other ideas?

    It relates to your suggestion in that, the reason I posted was to solve a thumbnail issue.
    "re: Thumbnails do not display after using rebuild tool"
    Terence suggested reloading my back up library.
    I asked Terence where I should import to.
    I was thinking that my thumbnail issue was related to the way I imported my back up.
    You clarified where to import the library...
    I tried it and I still have no thumbnails
    I have already tried repairing permissions and rebuilding thumbnails using the i photo repair tool.
    can you help me?

  • SHCess field not appearing after using utilization tab in excise invoice

    Dear All,
    SHCess field not appearing after using utilization tab in excise invoice.The other fields and values releated to SHCess are appearing.
    Please give the inputs.
    Regards,
    deepti

    issue resolved

  • Mail not working after using migration assistant - what am I missing?

    Mail not working after using migration assistant - what am I missing?

    The mailbox list is divided into categories with headings in caps, such as ON MY MAC. When you hover the cursor over one of those headings (except for MAILBOXES), you should see the word Show or Hide on the right. Click Show. The  MAILBOXES category can't be hidden.
    In each category, the mailboxes are arranged in groups, such as Inbox. To the left of each group is a small disclosure triangle. If the triangle points to the right, click it so that it points down.

  • JTree in JScrollPane not resizing after model change.

    I have a JTree in a JScrollPane that's put in a JPanel using the JGoodies FormLayout as it's layout manager. The column definition defines the column to grow so the JScrollPane should have enough space. The tree is empty when I create it and put it in the JScrollPane.
    After adding some nodes to the tree the JScrollPane does not resize automatically, it only resizes when a forced repaint occurs (moving or resizing the window , etc).
    I've tried calling invalidate(), repaint(),revalidate() on both the JTree and the JScrollPane. I also do a reload() on the TreeModel after adding the nodes (which is probably unnecessary as I use insertNodeInto(node,parent,position) from the DefaultTreeModel to add the new nodes).
    Anybody knows what I'm missing here?
    Thanks a lot in advance !

    Update:
    The card is running now. I had another Arch system (arch2) on the same network (to compare with), and after I shut that down and rebooted the first one (arch1) the network interfaces show up, both lo and eth0.
    However, the startup routine hangs about 2-3 minutes on the network daemon (with blinking router lights and hdd activity), so it's still not perfect. Another thing is that I can't get the right gateway from the router's dhcp. Here's an overview of the setup:
    Home: 192.168.2.x
    arch1 .2.102-------|
    |
    arch2 .2.101-------| old SMC router: .2.1
    |
    fritzbox .2.2 -----|
    router/modem
    |
    |
    ~~~~~
    internet
    The gateway is supposed to be the fritzbox with ip 192.168.2.2. The old SMC router serves addresses in the range .2.101-110. I set it up this way because I need the 8 ports on the SMC (and I like watching the lights).
    Here's my /etc/rc.conf for both systems:
    arch1 (starts slow):
    eth0="dhcp"
    ROUTES=(!gateway)
    arch2 (working):
    eth0="eth0 192.168.2.101 netmask 255.255.255.0 broadcast 192.168.2.255"
    gateway="default gw 192.168.2.2"
    ROUTES=(gateway)
    arch1 gets the SMC as gateway, arch2 gets the fritzbox.
    Ideally all computers on the network should get their IPs from the SMC dhcp, which also gives them the fritzbox as gateway. But that just doesn't work for the arch1. arch2 and the windows PCs get online just fine.
    I had also tried setting arch1 the same as arch2 except for the ip=2.102. Then the network starts faster, but the gateway is still stuck at the SMC router -> no internet.
    Rather complicated, but what are networks for? Anyone see daylight in this mess?
    Last edited by bitpal (2009-08-13 21:24:02)

  • Aperture 2.0 Activation Key does not work after using older trial version

    I was using the installed trial version of Aperture 1.5+ in my recently purchased MacBook Pro Duo (December 2007). After using the trial version for 30 days I debated whether to take the plunge ...and then within a few days recieved word that v2.0 was out at 199$. That motivated me ...however, here I am nearly one week later without ability to activate a full blown version of 2.0.
    I recieved the activation key, but it doesn't accept it in the dialog to upgrade in the trial version. Hint seems to be that it is not a serial number I am entering but an activation key.
    I did not order a boxed version, so what do I do now? Support is not too helpful as I have searched Apple's website and have no clue as to where to go.
    Last resort ... I want my $199 back!

    did you download the trial for Aperture 2

  • Swipe for Notification Center and Control Center not working after using Window Zoom

    I'm using iOS 8.0.2 on an iPhone 6 and have noticed that after using the Window Zoom (Accessibility feature 3-finger double-tap), I cannot swipe down for Notification Center nor swipe up for Control Center when unlocked (i.e. in Home screen or within an app screen). However, when the iPhone is locked, the swipe down for Notification Center and swipe up for Control Center is okay. It just doesn't work when unlocked. And the only way to rectify the problem is to reboot the phone.
    Has anyone else experienced this?

    I have figured out the solution to all of our problems!!! We can keep the zoom function ON!!!! Yay!
    Step one. Turn back on the beloved zoom function.
    step two. Tap screen with 3 fingers.
    step three. Select window zoom. (If already selected move on to step Quatro)
    step qautro. Select Resize lens.
    and for the moment you've all be waiting for... Drum roll..
    the grand finale step. IS...
    shrink the window to the smallest size.
    AFter you have done these 5 steps, you can thoroughly enjoy having all three functions at once. If you switch back to Full Screen Zoom (if that be your preference) the notification and control centers will remain functional! Bon apetit!
    i have been successful enlarging the window while keeping the centers functioning by making sure the window is in the shape of a square.
    -ChrisCasti

  • Hot Corners not working after using Call of Duty 4

    So I have noticed that Hot Corners are not working after i use COD4.
    I know that the game uses different resolution and somehow interupts the hot corner software. Buty why and how I dont know.
    I very often close COD4 by using Cmd+Q (or something like that)... But it doesnt matter if I quit it the "real" way. Hot corners still stops working after I use it.
    Hot corners works again if I reboot my iMac and also if I have used COD4 then go to System Preferences and Hot Corneres and make one change there.. then it magically works again.
    Does anyone have any definate solution for this.
    PS: I have an iMac 3.06 GHz Intel Core 2 Duo. 4GB 1067 MHz RAM and Lion 10.7.3.
    I also have a Macbook Pro with the same problem.... and both computers running Lion OSX and are always updated....
    Peace
    /Bobo

    Does your 8600M GT have 128 or 256MB VRAM? Both versions shipped with that model MBP. The game sysreqs says that, while 128 is minimum, 256 is preferred. We all know what "minimum" means in software advertising.
    Have you downloaded the SL Graphics updater?
    http://support.apple.com/kb/DL1083
    It's supposed to fix certain games but it's worth a shot.
    I'm surprised that the temp doesn't change. Even running the COD2 demo on my Late 2007 2.2G with 2G RAM and the 128MB version of the 8600, temps go up to 160-170F. That was under 10.5. Just upgraded to 10.6 Sunday, so I guess I should check COD2 again, because SL seems to run cooler on my MBP.

  • Pen tool not reconnecting after using convert point tool to reajust?

    Hi
    I was wondering if anyone had come across the problem pen tool not reconnecting afer using convert point tool to reajust? sorry if you don't understand what I mean, basically I can't reselect my pen tool to its path one doing another similar type task with another pen tool task.
    thanks,
    helen

    http://forums.adobe.com/people/Larry%20G.%20Schneider
    Larry,
    I Just tried the solution you gave. It did not work. I still have 1 point vectors in a very small image. The image is a simple drawing of a map. I just want to size it to fit a smaller page size.
    Elaine

  • Aperture not responding after using a sharpening brush

    anyone have a problem with aperture not responding after makeing a mod to a pic

    What is your Aperture version?  Aperture 2 and 1 do not work well with MacOS X 10.9.3.

  • Keyboard does not work after using Support Drivers

    I have a Macbook Pro 4,1 15" 2.4GHz C2D, and managed to get Bootcamp installed on it with Win7 Home Pro. I have verified that it runs correctly, but it is missing many of the drivers needed to make things run smoothly. I no longer have my Leopard disks that the machine came, so I figured the WindowsSupportDrivers would be the way to go.
    When I install them and reboot, the keyboard does not work. When I hit capslock, I get the caution notice indicating underneath my password field indicating the capslock key is on, so it's not like my entire keyboard is disabled. The system is unusable right now, since I have to enter my password to login, and it does not take any keyboard input. Using an external keyboard did not resolve this issue.
    I did a system restore to get it back to a usable state for the time being.
    Is there an alternative to the BCA support drivers or the Leopard disk? What's going on with my keyboard after the driver update?

    Maybe you have installed obsolete drivers. If you have Lion, open Boot Camp Assistant (Applications > Utilities) in OS X and download Boot Camp drivers

Maybe you are looking for