Creating Dynamic UI with Android Fragments
Jim Wilson
- 出版商: Packt Publishing
- 出版日期: 2013-09-22
- 售價: $1,790
- 貴賓價: 9.5 折 $1,701
- 語言: 英文
- 頁數: 122
- 裝訂: Paperback
- ISBN: 1783283092
- ISBN-13: 9781783283095
-
相關分類:
Android、使用者介面 UI
下單後立即進貨 (約3~4週)
相關主題
商品描述
Make your Android apps a superior, silky-smooth experience for the end-user with this comprehensive guide to creating a dynamic and multi-pane UI. Everything you need to know in one handy volume.
Overview
- Learn everything you need to know to provide dynamic multi-screen UIs within a single activity
- Integrate the rich UI features demanded by today’s mobile users
- Understand the basics of using fragments and how to use them to create more adaptive and dynamic user experiences
In Detail
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. 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).
Creating Dynamic UI with Android Fragments shows you how to create modern Android applications that meet the high expectations of today’s users. You will learn how to incorporate rich navigation features like swipe-based screen browsing and how to create adaptive UIs that ensure your application looks fantastic whether run on a low cost smartphone or the latest tablet.
This book looks at the impact fragments have on Android UI design and their role in both simplifying many common UI challenges and providing new ways to incorporate rich UI behaviors.
You will learn how to use fragments to create UIs that automatically adapt to device differences. We look closely at the roll of fragment transactions and how to work with the Android back stack. Leveraging this understanding, we then explore several specialized fragment-related classes like ListFragment and DialogFragment as well as rich navigation features like swipe-based screen browsing.
What you will learn from this book
- Understand the role and capabilities of fragments
- Explore the fragment-oriented features of Android Studio
- Create an app UI that works effectively on smartphones and tablets
- Use fragments to create engaging navigation capabilities like swipe-based screen browsing
- Work with special purpose fragment classes like ListFragment and DialogFragment
- Dynamically manage fragments using the FragmentTransaction class
- Learn appropriate application design for communicating between fragments
- Efficiently handle fragment creation and lifecycle
- Simplify cross-thread UI handling with fragments
- Form multi-screen UIs that run within a single activity
Approach
A fast-paced tutorial that guides you through everything you need to know about dynamic UI design for Android devices.
Who this book is written for
This book is for developers with a basic understanding of Android programming who would like to improve the appearance and usability of their applications. Whether you’re looking to create a more interactive user experience, create more dynamically adaptive UIs, provide better support for tablets and smartphones in a single app, reduce the complexity of managing your app UIs, or you are just trying to expand your UI design philosophy, then this book is for you.
商品描述(中文翻譯)
讓您的 Android 應用程式為最終用戶提供卓越、流暢的體驗,這本全面的指南將教您如何創建動態和多面板的 UI。所有您需要知道的內容都在這本方便的書中。
概述
- 學習提供動態多螢幕 UI 所需的所有知識,並在單一活動中實現
- 整合當今行動用戶所需的豐富 UI 功能
- 理解使用 fragments 的基本概念,以及如何利用它們創建更具適應性和動態的用戶體驗
詳細內容
要在 Android 上創建動態和多面板的用戶介面,您需要將 UI 元件和活動行為封裝成模組,這些模組可以在您的活動中進行切換。您可以使用 fragment 類來創建這些模組,這種類似於嵌套活動的行為可以定義自己的佈局並管理自己的生命週期。當 fragment 指定自己的佈局時,它可以與活動內的其他 fragments 以不同的組合進行配置,以修改您的佈局配置以適應不同的螢幕尺寸(小螢幕可能一次顯示一個 fragment,但大螢幕可以顯示兩個或更多)。
《使用 Android Fragments 創建動態 UI》將教您如何創建符合當今用戶高期望的現代 Android 應用程式。您將學習如何整合豐富的導航功能,如基於滑動的螢幕瀏覽,以及如何創建自適應的 UI,以確保您的應用程式在低成本智能手機或最新平板電腦上都能看起來出色。
本書探討了 fragments 對 Android UI 設計的影響,以及它們在簡化許多常見 UI 挑戰和提供新方法以整合豐富 UI 行為方面的角色。
您將學習如何使用 fragments 創建自動適應設備差異的 UI。我們將仔細研究 fragment 交易的角色以及如何與 Android 回溯堆疊一起工作。利用這種理解,我們接著探索幾個專用的 fragment 相關類別,如 ListFragment 和 DialogFragment,以及豐富的導航功能,如基於滑動的螢幕瀏覽。
您將從本書中學到的內容
- 理解 fragments 的角色和能力
- 探索 Android Studio 的 fragment 專屬功能
- 創建在智能手機和平板電腦上有效運作的應用程式 UI
- 使用 fragments 創建引人入勝的導航功能,如基於滑動的螢幕瀏覽
- 使用特殊用途的 fragment 類別,如 ListFragment 和 DialogFragment
- 使用 FragmentTransaction 類動態管理 fragments
- 學習適當的應用程式設計以便在 fragments 之間進行通信
- 高效處理 fragment 的創建和生命週期
- 使用 fragments 簡化跨執行緒的 UI 處理
- 形成在單一活動中運行的多螢幕 UI
方法
這是一個快速的教程,指導您了解有關 Android 設備動態 UI 設計所需的所有知識。
本書的讀者對象
本書適合對 Android 程式設計有基本了解的開發人員,旨在改善其應用程式的外觀和可用性。無論您是希望創建更具互動性的用戶體驗、創建更具動態適應性的 UI、在單一應用程式中為平板電腦和智能手機提供更好的支援、減少管理應用程式 UI 的複雜性,還是僅僅想擴展您的 UI 設計理念,這本書都適合您。