Android Project-several common Android application architectures

Source: Internet
Author: User

1. Single Activity architecture

Home is activity, inside page for view

    • The bottom bar of the head is common, just changing the text and pattern.
    • Bottom navigation bar is RadioButton
    • Middle can slide to toggle
    • Jump quickly, but the home page is not smooth.

The benefits of this architecture are clear thinking and low system operating overhead. The downside is poor control, code clutter, and poor lifecycle management.

2. Multiple activity-use baseactivity to provide commonality

3, multiple activity-use tabactivity

Sub Mainactivity (tabactivity)->activity (baseactivty)

    • Code and ideas are clear
    • Baseactivity has the same back and head bottom bar

3.1 Sun Mainactivity (tabactivity)--Child Activity (Activitygroup)->activity (baseactivty)

PS: For jumps that need to implement multiple activity within a tabhost

3.2 RadioButton with tabactivity jump (code very clear)

4, multiple Activity-activitygroup (official has been marked as not recommended)

The bottom bar is implemented with the GridView, and the bottom is used RadioButton

Android Project-several common Android application architectures

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.