(1) Project preface and project Preface
1. Have a deep understanding of the three features of Java, including encapsulation, inheritance, and polymorphism.
2. Callback is the most basic design mode. Callback is actually not difficult. In fact, if you really thoroughly understand the observer mode, callback looks very simple. The same principle is true!
In Android, you want to write a high-quality code. Callback is the most basic thing.
For example, you will often write callback. In fact, I will share with you the most essential things (this is a simple example, which is widely used in projects)
You will define A class A, and you will also define A class B, because the callback must be interactive between classes.
What is the callback? For example, class A wants to call c () in class B. I want to do so. In the result, I use the c method in class B, then, the d () method in class A is called back.
Callback
1: class {
D ();
}
2: class B {
C ();
}
3. Fragment is one of the many elements currently used
The menu is Fragment, and the right side is Activity. The method in the Activity is called through Fragment, and the Activity responds to Fragment. This is the callback.
4. Use some open-source projects (Slid-Menu Universal-Image-Loader)
5. This is a project practice. Therefore, we need to make some universal things. Now there are many applications in the application market, and many applications have many commonalities. Therefore, we need to encapsulate common things for agile development.
6. We need to learn the experience to deal with some things. We can't just talk about some details. We need to talk about some details.
For example, if you use ListView, do not just use the Adapter to accept data.
For example, the ListView of the mall,
For example, item is a product. When we click this product, we will see a detailed introduction to this product. Then I will return it, And the font of the item we have seen will change to a color, because there are a lot of products, if you choose more, it will be messy. If I mark the items I have seen, the user experience will be high. If you haven't developed such details, you won't pay attention to them.
In the second aspect, for example, how to implement a carousel image, you generally use viewpager and gallery to implement it, because all these images need to be tuned. This is not the case.
But this will cause a problem.
Google provides us with many controls, but many times these controls cannot meet our needs.
So we can write custom controls.
At this time, I will encapsulate a control, because ViewPager cannot meet my needs, and my needs are hope, for example, when I want to create Project A, I want to copy the entire ViewPager to Project B, or copy it to Project C. I copied a class of ViewPager that I encapsulated directly. How can we directly drop a timer into a ViewPager. In this way, other projects do not need to use native ViewPager. I encapsulate it into a super powerful class.
I think the theory is very important, and the general theoretical knowledge of experts is particularly solid.
We hope everyone can work together.