3 Replies Latest reply on Nov 15, 2010 1:42 PM by Jason San Jose

    Reference applications with views containing only text


      I've been using PHP, HTML, CSS for years and just got my hands on Burrito. I went through the Mobile Test Drive, Flex in a Week, and am really enjoying the possibilities and flexibility in creating Android apps (made a Fallout: New Vegas Wasteland Journal app with interactive map and local db to jot notes down about locations that myself and all my friends have used the eff out of lately...w00t!). But there is one major, basic thing I seem to be missing: Pages of just text.


      I'm beginning the police academy this month and would love to have a reference app that covers our state's criminal code and traffic code, but have not been able to find a way to just have pages of text. The <s:label> tag does not seem to be scrollable, even inside a scroller or vgroup. I've scoured these forums and the only post I found was one in the Flex forum that gave a very general pointer, then referred them to this forum (which you can't seem to search very easily). A lot of resources on Google seem pretty outdated or not applicable to Hero.


      I'm playing with ways of importing from an XML file, which would make future edits much easier, but it's not tabular data, it's going to be several paragraphs for each view. Is there a way to just create blocks of text that will scroll when it extends beyond the screen's size?

        • 1. Re: Reference applications with views containing only text
          jacobk83 Level 1

          I've been going through Adobe Flex 4 Training From The Source Vol. 1 trying to find my answer to this, and the breakdown of the different ways to show text point to TextArea being the only one which will allow the user to scroll if the text extends beyond the area's boundaries.


          I have created a view with the following code as a test:



          <?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="Home">


                    <!-- Place non-visual elements (e.g., services, value objects) here -->

                    <fx:Model id="faction">


                      <desc>The Brotherhood of Steel (BoS) is a tech-religious organization, with roots in the American military and government-sponsored scientific community from before the Great War. The Brotherhood is mostly composed of the descendants of those military officers, soldiers, and scientists, but aside from some outsiders among their ranks, the Brotherhood is as close to pure-strain humanity (prime normals) that may be found outside of a Vault or the Enclave.





               <s:VGroup left="10" right="10" top="10" bottom="327">

                    <s:TextArea editable="false" verticalScrollPolicy="on" selectable="false" width="100%" height="250" text="{faction.desc}"/>




          If I understand correctly, this should allow the text to be scrolled, but it doesn't. I'm really at a loss here because not much has spread around to different forums on things with Hero specifically, but I'm assuming it should be about the same.


          Is there something I'm missing?

          • 3. Re: Reference applications with views containing only text
            Jason San Jose Adobe Employee

            You're not missing anything, it's not implemented in the mobile theme yet.


            You can get the desktop behavior back by referencing the desktop skin: <s:TextArea skinClass="spark.skins.spark.TextAreaSkin" .../>


            Jason San Jose

            Software Engineer, Flex Mobile