Ignore the previous minor attacks. This project is my first project-scnu's Android client for Internet public course selection. The project started in middle May and went through several weeks of examination review. Now it can be said that it has been completed (maybe there are some details to modify ). This project has brought me a lot of experience, including Android Development and others, so it is necessary to write a summary.
The project's Story version was designed by another person in charge of the iPhone version, so the interface looks like the iPhone, as kinfey (boss) said, different platforms of a project must have their own platform features, so different platforms of the next project will have different story versions. The specific function of the project is to enable students, teachers, and administrators to perform related operations through the mobile app. They can watch videos, forums, posts, replies, homework, and statistics... summary:
1. Story Edition
The story version is the overall design of the project, including the initial model of the entire interface. In fact, the story version is reserved by kinfey. I think this is beneficial to the implementation of the entire project. With the story edition, the functional logic of the entire project is clearly understood, so that the functional requirements are not confused during development. Secondly, the story edition is also conducive to mastering the technical difficulties of the entire project.
2. IProgramYuanmeigong
This is kinfey's work habit. This mode is good for projects that are not very large, because it gives programmers great freedom to better grasp the global situation. So there are three Android and iPhone clients in this project, two programmers and one artist.
3. Overall View
This project is a client that can be used by students, instructors, and administrators. Because the interfaces of the three are similar, it is like implementing the student end in the first place. But when I want to add the other two, many of them are named as students, this is annoying because it is prone to errors.
4. Android Multi-Resolution
This is also a tough problem in the project. At first, the artist did unnecessary work because he didn't think about how to solve it. In fact, a set of images can be solved: only the artist designs a set of high-resolution images, and then all the images must be scaled proportionally. Experience from instructor Peng of the net institution: Keep your graph relative position in the parent container unchanged. In fact, there is only one sentence, and the proportion remains unchanged. Only in this way will the image not be deformed. (For details, refer to Android: screen adaptation)
5. multi-view jump in a tab
This has also plagued me for the last two days. The problem is that the tab bar of the android tab disappears when it is redirected. In fact, it is transferred to other activities and left the tab, without the iPhone tab jump, the final solution is to use tabhost + fragment, and fragment is a new feature after 3.0. Its original purpose is to achieve paging effect, just like the iPhone splitview, however, you can use it to manage fragment. For more information, see Android tabhost with fragmentactivity.
6. gson
This time, the gson library is used to parse JSON. It is quite easy to use. Pay attention to the resolution of the model as long as the required data on the line, not all, at first thought to all set up, a lot of get set .....
7. MVP
No stranger to MVC, Model View Controller. The MVP mode is the improvement of MVC, and the interaction between view and model should be implemented through presenter. This mode is also an "Convention" with kinfey ". In this mode, the program is layered, and the development feels a bit like a view on the iPhone corresponds to a controller. The structure is clearly defined, and various things will be easier to handle, and problems will be quickly discovered. For more information, see
There will be a sample template mentioned in the http://jamespeckham.com/blog/10-11-21/MVP_on_Android.aspx, just do it, its elegance is still applied to the project will be realized.
8. asynchronous
The asynchronous use of GCD in the iPhone can be implemented. It is very troublesome for Android to manage thread classes by itself. Later I found that it was not so humane. Haha, Android's Asynchronization was implemented using asynctask. Asynchronous mode was added later, and the operation was relatively simple. This is partly because of the MVP model.
9. Activity stack and program exit
The program should pay attention to the unified logic of the return button and the physical return key. This requires an understanding of the activity stack. The exit of the program is also related to this. Now we implement the global variable method, but we always feel that this method is not very good. You need to find other solutions.
The program believes that there is a confidentiality agreement, it cannot be pasted, but you can paste a few pictures... the art teacher is awesome!
(It is intercepted in the simulator, so the tab display is not normal, it is originally a word display)
So far, continue to cheer, mybkn!