Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

TweetDeck Part 2: Preparing The Main View

DZone's Guide to

TweetDeck Part 2: Preparing The Main View

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Creating the Project

We shall start with creating the project. In Flash Builder go to  File > New > Flex Mobile Project and name it "TweetDeck" > Finish. For the template select the second one : View-Based Application. Flash Builder will create a new View named "TweetDeckHomeView.mxml" which will be the first one in our Project. Its in this View that the work will be done.

Placing the elements

Before we see every bit of the interface in detail, we will make a "skeleton" of our View. Here is the main Interface of the TweetDeck application on Android
 
Evidently,the application is composed of 3 main parts , vertically.Here we are not using the standard "ViewNavigator" hence we are not using the ActionBar.For deleting the actionBar, we use the propriety "actionBarVisible" of the View object which we are going to change to "false".
Here is the skeleton of the app with rectangles of colors : 
<?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"
        actionBarVisible="false">
  <s:layout>
    <s:VerticalLayout gap="0" />
  </s:layout>
  <s:Rect width="100%" height="40">
    <s:fill>
      <s:SolidColor color="0xFF0000" />
    </s:fill>
  </s:Rect>
  <s:Rect width="100%" height="100%">
    <s:fill>
      <s:SolidColor color="0xFF0FF0" />
    </s:fill>
  </s:Rect>
  <s:Rect width="100%" height="80">
    <s:fill>
      <s:SolidColor color="0xFFFF00" />
    </s:fill>
  </s:Rect>
</s:View>

After testing in the emulator , here is the result :

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Published at DZone with permission of Mohamed Haamdi. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}