Android Learning Route (20) using fragment to build dynamic UI

Source: Internet
Author: User

To create a dynamic or multi-panel user interface on an Android system, you need to encapsulate the UI component and activity behavior as a module, allowing it to switch between display and hide in your activity flexibly. You can use Fragment classes to create these modules, which can behave like nested activity, which define their own layouts and manage their own life cycles.

When a fragment specifies its own layout, it can be configured for different combinations in activity and other fragment, so that you can modify your layout configuration for different screen sizes (one fragment on a small screen at a time, and show two or more on a big screen at a time).

This lesson shows you how to use fragment to create a dynamic user experience while optimizing your app's user experience on devices of different screen sizes, while supporting the Android 1.6 version.

Course
Create a fragment
Learn how to build a fragment and use its callbacks to implement the basic behavior of fragment.
Build a flexible UI
Learn how to build a different fragment for your app on different screens The layout of the configuration.
Communication between Fragments
Learn how to set up a fragment with activity to and other fragments communication paths.

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.