1. Project Structure The MVP model is becoming more and more popular nowadays. It is adopted by default.
If the project is large, the above method will definitely result in nearly a hundred files in the presenter and view. See the blind series. The following methods are recommended:
2. Configure the theme Ignore this step for projects that do not adhere to Material Design. 1. First write the required color in color.xml:
Note that color.xml is a color table. It should describe colors instead of defining font colors, background colors, etc. This can prevent similar colors from being defined repeatedly, which would lead to inconsistent interface colors. 2. Define the theme in style.xml:
In the res directory, create a values-v21 directory and then create a style.xml:
Then modify the theme attribute of application in the AndroidManifest.xml file to the AppTheme defined above to achieve the immersive status bar. Then refer to my other two blogs for detailed settings of Theme and Toolbar: 3. Dependent libraries and SDK Required libraries: Here are some libraries I wrote. If you have any suggestions, please feel free to communicate: I have tried many, and these are the ones I use most often. After relying on a lot of libraries and SDKs, it is recommended to initialize them at the right time, rather than piling them all in the onCreate() of Application. This will cause the startup time to be too long and the startup will be slow, although it will not affect the normal use of the functions. 4. Configure Gradle Some SDKs need to check whether the signature is correct when running. Therefore, you must sign with the official KEY in debug mode. It is not a wise idea to put the signature into version control. Therefore, the following approach is recommended:
Create a new signing.properties file in the same directory as the app's gradle file and fill in the corresponding information of your key
Add signing.properties to the ignored directory. 5. Establish development specifications In order to avoid different styles of code written in collaborative development, or multiple development modes are made. The following is an example. After all, it is formulated for efficient development. The one that suits your project is the best. layout naming, for example id naming, example Variable naming: Start with m. For example, mAdapter, when you use it, all the methods will come out after pressing one m. Method naming: It is better to write a good comment than a good name. = =. TextView uses the official standard font TextView.png
Button uses the Material Design standard style Button.png
Determine how to write network requests, how and where to store files, and how to use the class library framework used in the project. Okay, let’s start the official development! |
<<: Why You Should Try Full Stack
In recent years, with the high incidence of disea...
Hupu is a pan-entertainment community product tha...
Rumor : "Certain food ingredients can fight ...
[[408769]] According to MSPoweruser, Microsoft re...
When it comes to product operation , the main tas...
Review: Experts from the National Health Science ...
Looking back at 2020, although affected by the ep...
This is an answer to a question invited by netize...
The fifth mass extinction event, which occurred a...
APP online promotion activities refer to activiti...
How much does it cost to attract investment for t...
Introduction to the resources of the third course...
99% of marketing has probably encountered these p...
When I was young and ignorant looking for a job, ...
Online traffic costs remain high, and corporate o...