0 Replies Latest reply on Dec 28, 2011 10:50 PM by crikos

    Problem with Softkeyboard

    crikos

      Hi everybody,

      I am working on a mobile Application and have troubles with the Softkeyboard.

      In a view I have a List component which uses an ItemRenderer. When I run the application and tap into a TextInput Field the Softkeyboard raises, but with two problems:

      - wrong KeyboardType (should be numeric)

      - the List Component doesn't scroll. If the selected Element is at the bottom, the Keyboard hides the Input Control.

       

      here is my code:

       

      The List Component:

       

      ....
      
      <s:List id="productList" width="100%" height="100%" alpha="1" 
                                              dataProvider="{olModel.orderlists}"
                                              itemRenderer="views.itemRenderer.WBOrderItemRenderer"
                                              labelField="product_group" contentBackgroundAlpha="0"
                                              needsSoftKeyboard="true"
                                              >
        <s:layout>
                                              <s:VerticalLayout gap="5" paddingTop="10" paddingLeft="5" paddingRight="5" paddingBottom="10" useVirtualLayout="false" />
        </s:layout>
       </s:List>
      ....
      

       

      and the ItemRenderer:

       

      ...
      <s:states>
                          <s:State name="normal" />
                          <s:State name="hovered" />
                          <s:State name="selected" />
        </s:states>
                <s:Group width="100%" height="50" needsSoftKeyboard="true">
                          <s:Rect width="100%" height="100%" radiusX="10" radiusY="10">
        <s:fill>
             <s:SolidColor color="#ffffff"/>
        </s:fill>
        <s:stroke>
             <s:SolidColorStroke color="#696969" />
        </s:stroke>
        </s:Rect>
                          <s:HGroup paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2" >
                                    <s:Label width="100%" height="35" color="#000000" maxDisplayedLines="1"
                                                         text="{data.product_name}" verticalAlign="middle"
                                                         height.normal="45" fontSize="18"/>
                                    <s:Button width="45" height="45" icon="@Embed('assets/icons/Arrow2-Down.png')" click="changeAnzahl('Down')"  />
                                    <s:TextInput id="anzahlTI" width="50" height="45" focusIn="{anzahlTI.text=''}"
                                                                   softKeyboardType="number" text="@{data.anzahl}" textAlign="right"
                                                                   fontSize="18" visible="true" skinClass="spark.skins.mobile.TextInputSkin" />
      
                                    <s:Label width="50" height="45" color="#000000" maxDisplayedLines="1"
                                                         text="{data.product_bundle}" verticalAlign="middle"
                                                         fontSize="18"/>
                                    <s:Button width="45" height="45"  icon="@Embed('assets/icons/Arrow2-Up.png')"  click="changeAnzahl('Up')" />
        </s:HGroup>
        </s:Group>  
      ...
      

       

       

      Regards