Hi,

When used on mobile, the ScrollableStageText class is the implementation of the 
textDisplay:IEditableText, which is a SkinPart of TextInput, unfortunately the 
ScrollableStageText class doesn't support MXML, so you cannot use it in your 
own TextInputSkin.mxml

The workaround I found is:

1. Don't do your own TextInputSkin.mxml for TextInput

2. Instead, you hide the border, contentBackground and focus for TextInput:
<s:TextInput borderVisible="false" contentBackgroundAlpha="0" focusAlpha="0"/>

3. Write a Rect as the border around the TextInput:

<s:Group>
    <s:Rect width="100%" height="100%">
        <!-- finish your border details here -->
    </s:Rect>

    <s:TextInput borderVisible="false" contentBackgroundAlpha="0" 
focusAlpha="0" top="4" bottom="4" left="4" right="4"/>
</s:Group>

4. Fine-tune the code I wrote above, add additional parameters if needed.

That's it, this is how I do it, it works perfectly for me, not only it works on 
mobile, but also works on desktop and web as well.

Sent from DarkStone's iPhone
2014-06-14

> 在 2014年6月14日,3:32,Jonathan Christian <jcisinthehous...@gmail.com> 写道:
> 
> Hey Apache friends,
> 
> 
> I'm a little perplexed on this issue I am having. The ultimate goal is to
> have square corners on a textinput box in a mobile flex project using Flex
> 4.12.1 and AIR 13.
> 
> I have a typical spark textinput box that uses spark.components.textInput 
> (<s:TextInput>) -  works fine
> 
> But when I add a skinclass of 
>     [HostComponent("spark.components.TextInput")]
> for my host component in an MXML spark skin I achieve my rectangular input
> box but lose the keyboard in iOS - works fine in android.
> 
> I tried a basic project doing the same hostcomponent as my skin and had the
> same results.
> 
> Any ideas on why this is and is there a way to make this work? 
> 
> Thanks,
> Jonathan
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-flex-development.2333347.n4.nabble.com/TextInput-skin-no-soft-keyboard-in-iOS-tp38286.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to