0 Replies Latest reply on Mar 1, 2012 7:32 AM by MichaelRix

    Flex Mobile textArea styling the text?

    MichaelRix

      I've read in several documents about TLF not supported in Flex Mobile. I then read about text fields vs textArea and css Style sheets.

      I'm trying to keep this really simple 1. cause I'm learning 2. So I can build on best practices 3. I'm still learning....

       

      Example:

      Main

      <?xml version="1.0" encoding="utf-8"?>

      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

        xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"

        creationComplete="creationCompleteHandler(event)">

      <fx:Script>

        <![CDATA[

         import mx.events.FlexEvent;

         [Bindable]

         private var xmlInfo:XML;

         import mx.rpc.events.ResultEvent;

         protected function info_resultHandler(event:ResultEvent):void

         {

         

          xmlInfo = new XML(event.result.text);← I want to say this is where I need to tell Flex how to interprit the incoming text format.

         

         }

        

         protected function creationCompleteHandler(event:FlexEvent):void

         {

          infoXML.send();

             

         }

        ]]>

      </fx:Script>

        <fx:Declarations>

         <s:HTTPService id="infoXML" url="assets/data.xml"

               resultFormat="e4x"

               result="info_resultHandler(event)"/>

      </fx:Declarations>

        <s:TextArea id="spInfo" text="{xmlInfo}" width="100%"/>

      </s:View>

       

       

      data.xml

       

      <?xml version="1.0" encoding="utf-8"?>

      <info>

      <text><![CDATA[<b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial

      ]]>

      </text>

      </info>

       

      Mobile app output

      <b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial

       

      Thank you in advance.