<Mastering Android Application Development> - Note 01
来源:互联网 发布:织梦网站源码下载 编辑:程序博客网 时间:2024/04/25 20:50
Chapter 1: Getting Started
Introducing Material Design
The material is a metaphor of an element that can be seen on the surface; it consists of layers that can have different heights and widths, but their thickness is always one unit, as with sheets of paper.
- We can place materials above each other, which introduces a depth element to the view, aZ coordinate.
- The content is displayed on the materials but they don't add thickness to it.
- The material can expand and the content can expand with it, but the content can never expand more than the material.
Design support library is a must have library that includes animations, FAB (Floating Action Button), and the navigation drawer.
Chapter 2: Designing our App
Selecting an app-navigation pattern
Basic structure
For more information on the app structure and similar information on material design, refer to the following links:
- https://developer.android.com/design/patterns/appstructure.html
- http://www.google.com/design/spec/patterns/appstructure.html#
The dashboard pattern
The sliding panel
This pattern is perfect if we have a large number of options at the same level in our app, and it can be combined with other patterns.
The implementation of this panel can be done with the DrawerLayout class, which is composed of two child views: a FrameLayout with the content and the navigation drawer, which can be ListView or any other custom layout containing the options.
Tabs
It shows a fixed menu with components at the same level. Note that when we have tabs, the menu is always visible, which doesn't happen in the sliding and dashboard patterns.
Fragments
Understanding the importance of fragments
It is important to explain why Android examples create the fragments using the MyFragment.newInstance(params) factory method:
Android only recreates Fragments using the default constructor; therefore, if we have a constructor with parameters, it will be ignored, and the parameters will be lost.
The Fragment Manager
Any operation, such as adding, replacing, removing, or finding a fragment, has to be done through Fragment Manager inside an activity.
Fragments stack
ViewPager
Adapter
ViewPager works with an adapter; the adapter is the element in charge of creating every page that we swipe.
Transitions
- For the transitions between activities, we need to call overridePendingTransition just before starting the new activity. The method receives two animations as parameters, and these animations can be in an XML file created by us or be chosen from the already created animations in Android.
- In the case of fragments, we need to specify the transition in the FragmentTransaction object. Using the object animator, we can define this in two XML files.
Chapter 3: Creating and Accessing Content from the Cloud
Creating your own cloud database
Parse
...
Android's Application class
- Override the onCreate method he onCreate method is called every time our Application is created; therefore, it's the right place to initialize our libraries and third-party SDKs.
- We need to tell our app that we have a new Application class and that that's the one we want to use;
- If we need a global variable in our app that needs to be accessed by all Activities/Fragments, this would be the right place to have it.
Storing and consuming content from Parse
Chapter 7: Image Handling and Memory Management
...
Mastering images
Vector drawables
Chapter 8: Databases and Loaders
...
Content providers
- <Mastering Android Application Development> - Note 01
- <Professional Android 4 Application Development> - Note 01
- Mastering Android Application Development.pdf 英文原版 免费下载
- <Professional Android 4 Application Development> - Note 02
- Professional Android Application Development
- Android Studio Application Development.pdf
- Mastering Web Application Development with AngularJS-Packt 2013 读书笔记(不错的好书!)
- Android Phone Application Development(Part 1)
- 《Professional.Android.2.Application.Development》摘抄
- Ten Tips for Android Application Development
- My environment of phone application development, Android
- Android Application Development, 1st Edition
- Android Application Development一书例程地址
- Professional Android 4 Application Development Notes
- [Read note] Android Dev Guide -> Application Fundamentals
- GIS Development Note - 1
- Development Note---开发手记
- Unity5 development note
- ExecutorService.invokeAny()和ExecutorService.invokeAll()的使用剖析
- 聊聊Linux 五种IO模型
- 缓存穿透、缓存并发、缓存失效之思路变迁
- 好屌哦,原来git和github是有关系的
- 逻辑思维小测试
- <Mastering Android Application Development> - Note 01
- Java数据结构和算法——队列
- 初步了解大数据概念
- (Leetcode)43. Multiply Strings
- javascript(二) JavaScript之创建类
- Cocos2dx 关闭CCLOG
- android设置背景平铺
- Universal-ImageLoader
- 聊聊IO多路复用之select、poll、epoll详解