4. Building a Dynamic UI with Fragments 使用片段构建动态UI
Posted youseiraws
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了4. Building a Dynamic UI with Fragments 使用片段构建动态UI相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
用spring tool suite插件创建spring boot项目时报An internal error occurred during: "Building UI model"
4.3 Building a Datapath-Computer Organization and Design笔记
SPRING IN ACTION 第4版笔记-第五章BUILDING SPRING WEB APPLICATIONS-002-Controller的requestMappingmodel
错误:flutter/lib/ui/ui_dart_state.cc(157) 未处理的异常:类型 'Future<dynamic>' 不是类型 'FutureOr<Null>
SPRING IN ACTION 第4版笔记-第五章BUILDING SPRING WEB APPLICATIONS-003-示例项目用到的类及配置文件
使用 TF Recommenders 构建排名模型 4使用 TensorFlow 构建推荐系统 Building a ranking model with TF Recommenders