Design Patterns, Fragments, and Real - World App Development
1. Fragment Reality Check
When we first run an app with a clickable button that required two layouts and two complete classes to create, we might wonder about the purpose of using Fragments. In fact, our initial Fragment mini - app would have had the same appearance and functionality without Fragments, and using them made the process more complicated.
However, Fragments have their advantages. A Fragment can be added to an Activity’s layout. It has its own layout (view) and code (controller), and although hosted by an Activity, it is virtually independent. An Activity can host two or more Fragments, allowing for multiple almost - independent controllers on a single screen.
Moreover,
超级会员免费看
订阅专栏 解锁全文
1337

被折叠的 条评论
为什么被折叠?



