Start sencha touch 2 Tour II

Source: Internet
Author: User

Now, tabpanel is displayed on the screen, but you can beautify the homepage.

The current page has at least the following issues:

      1. Placing tags on the top is not very nice.
      2. The home page buttons also seem monotonous.
      3. NO content.

    Let's see how we did it. Modify the tabbarposition configuration item and add some HTML content:

    Ext. Application ({

    Name: 'sencha ',

     

    Launch :(){

    Ext. Create ("Ext. tabpanel ",{

    Fullscreen: True,

    Tabbarposition: 'bottom ',

     

    Items :[

    {

    Title: 'home ',

    Iconcls: 'home ',

    HTML :[

    ' ',

    '<H1> welcome to sencha touch

    "<P> you're creating the Getting Started app. This demonstrates how ",

    "To use tabs, lists and forms to create a simple app </P> ",

    '<H2> sencha touch (2.0.0pr1) </H2>'

    ]. Join ("")

    }

    ]

    });

    }

    });

     

    So far, some HTML content has been available, but the format effect is not so ideal and needs to be adjusted (click the preview button to viewCodeExample ). Set the HTML content style. To achieve better results, you only need to add the CLS configuration item to the Panel to achieve the goal. You can simply add a CSS class. CSS is defined in the examples/getting_started/app.css file. After adding CSS, our home page will look like this:

    Ext. Application ({

    Name: 'sencha ',

     

    Launch :(){

    Ext. Create ("Ext. tabpanel ",{

    Fullscreen: True,

    Tabbarposition: 'bottom ',

     

    Items :[

    {

    Title: 'home ',

    Iconcls: 'home ',

    CLS: 'home ',

     

    HTML :[

    ' ',

    '<H1> welcome to sencha touch

    "<P> you're creating the Getting Started app. This demonstrates how ",

    "To use tabs, lists and forms to create a simple app </P> ",

    '<H2> sencha touch (2.0.0pr1) </H2>'

    ]. Join ("")

    }

    ]

    });

    }

    });

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.