码迷,mamicode.com
首页 > 其他好文 > 详细

4. Building a Dynamic UI with Fragments 使用片段构建动态UI

时间:2017-06-16 10:07:10      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:应用   体验   version   into   其他   activity   developer   creat   and   

To create a dynamic and multi-pane user interface on Android, you need to encapsulate UI components and activity behaviors into modules that you can swap into and out of your activities. You can create these modules with the Fragment class, which behaves somewhat like a nested activity that can define its own layout and manage its own lifecycle.

要在Android上创建一个动态和多窗格的用户界面,您需要将UI组件和活动行为封装到可以插入和移出活动的模块中。 您可以使用Fragment类创建这些模块,其行为有点像可以定义自己的布局并管理自己的生命周期的嵌套活动。

When a fragment specifies its own layout, it can be configured in different combinations with other fragments inside an activity to modify your layout configuration for different screen sizes (a small screen might show one fragment at a time, but a large screen can show two or more).

当片段指定自己的布局时,它可以配置为与活动中的其他片段不同的组合,以修改不同屏幕大小的布局配置(一个小屏幕可能一次显示一个片段,但是大屏幕可以显示两个或 更多)。

This class shows you how to create a dynamic user experience with fragments and optimize your app‘s user experience for devices with different screen sizes, all while continuing to support devices running versions as old as Android 1.6.

该课程向您展示如何创建具有片段的动态用户体验,并针对具有不同屏幕尺寸的设备优化应用的用户体验,同时继续支持运行与Android 1.6相同版本的设备。

4. Building a Dynamic UI with Fragments 使用片段构建动态UI

标签:应用   体验   version   into   其他   activity   developer   creat   and   

原文地址:http://www.cnblogs.com/youseiraws/p/7025661.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!