"The latest Android basic introductory tutorial in 2015" is finished~


Introduction:

I started writing this set of tutorials at the end of June, which lasted nearly five months. I finally finished it today. The text of the complete set of tutorials is 148 articles. Ten chapters, from basic UI controls to four major components, Intent, Fragment, event processing, data storage, network programming, drawing and animation, Multimedia, system services, etc. are all explained in detail! The code is all written on Android Studio, full text Using Markdown, the writing structure is clear, and some common problems in actual development are also analyzed...Due to the limitations of personal abilities, Although I have tried my best, there will inevitably be some errors and omissions. I hope readers will point them out. I am very grateful! In the process of writing this set of textbooks, I have a lot of feelings, and by finishing the last section of Scattering Flowers, I can express it quickly1.gif, which can be regarded as a temporary farewell to my blogging career... I can express it quickly~


1. The origin of this set of tutorials

I remember it was one night in May. I had just finished playing with my roommate and started playing with my mobile phone. I accidentally added w3c bird's nest Official account, and then read the pushed articles, which seemed a bit interesting, so I went to Du Niang and searched for "w3c Bird's Nest". Found that there are A column on the PHP Chinese website, and most of the tutorials in it are basic tutorials on the Web, and I saw the tutorials on the mobile side, above With "Learn Android"! Such a tutorial2.jpg, as an Android person, according to the storyline, I will definitely follow it immediately Go click on this link and something will happen... However, I didn't click on it... so the story ends here, haha... Of course, I ordered it in the end, but during this period I went down to drink a bowl of sugar water with my roommate~ Because it’s so old, but the content in the tutorial I have forgotten it, but I still remember that there is a copy of "Android Crazy Lecture Notes" at the bottom of my cabinet. It was the first book I bought in college. Programming book, haha, unfortunately I gave up after reading about 100 pages, a Chinese version of the API document haha... It is because of this book that I Huixiaozhu’s column on how to get started with Android. In the mood to give it a try, I added the w3c senior sister’s WeChat account and asked her if she needed it. I asked someone to write a basic tutorial on Android, and then sent him the link to Xiaozhu’s Getting Started. Then the senior sister seemed very happy. Then he asked if he could sell the copyright or something like that, Selling the copyright3.jpg? Doesn’t that mean you have money to collect? As a struggling student, I was a little excited when I thought about getting paid for writing something. As a result, I was so excited all night that I thought about it. A lot... Later I didn't know what I was thinking, so I chatted with FK (the webmaster of w3c Bird's Nest). Then I decided to write a set of basic Android tutorials on the PHP Chinese website of w3c Bird's Nest, 免费, well, that's right, it doesn't charge a penny. The premise is that the tutorial is not for commercial use. The reason may be that it is exaggerated by FK's sharing spirit, or it may be that I really want to write it. A set of Android tutorials. Most experts don’t have time or bother to write basic introductory tutorials, so let me, a scumbag, write it. Bar! It’s good to pave the way for the beginners behind~

The next step is to use Baidu Brain Map to conceive the content to be explained in the introductory series, learn the Markdown syntax, and then start working on it. I don’t want to write it on coder-pig, after all, there are many eunuch tutorials on it. Then I opened a small account and planned to write this set on it A new tutorial, but the number of visits is appalling. If you are a blogger and see what you have spent a lot of time writing, But when no one is watching, I must feel uncomfortable... Later, I silently moved it back to coder-pig, and then wrote the first chapter Finished, it has also started to be published on w3c Bird's Nest! Then every day I start the following same boring life: Every day when I go to work, whenever I have time, I will think about what knowledge points to write about today and what kind of interesting examples to write. Then after get off work at 5:30 in the evening, I go have a meal, and then come back and immerse myself in writing. I basically lock the door every night. I usually leave around 10:30, remember The last time I was writing, I was so excited that I didn’t notice the time until 12:30. After I finished writing, I looked at the time. Damn it, it was 12:30! ! ! 4.gif

I was so scared that I quickly packed my things and ran away, because the back door of the park seemed to close at 12 o'clock. When I got there, I found that the door was closed. I felt a chill in my heart. Damn it, are I really going to sleep in the company tonight? When I walked in, I found that the door was ajar. It was not locked, and I finally returned to the dormitory smoothly... There are usually no programs on Saturdays and Sundays. I just go back to the company to code, and occasionally When the weather is nice, I go to play badminton with others. Most of my time is still spent on coding. I have persisted like this for more than five months. This set of tutorials It’s finally finished~

5.gifI feel a little happy and a little excited at the moment, but more of a relief, I’ve finally finished writing~~~ Why is it relief? Don’t worry, please listen to my explanation...


2. Let’s take a look at some of my situation


No need to ask in the group The Pig God is employed there, how much is his monthly salary, and he is my apprentice, etc. Now let’s take a look at some of his situation! This year's fresh graduates (15th class), the school is Beijing Institute of Technology Zhuhai College (Beijing Institute of Technology Zhuhai), currently working in the Southern Software Park, is An Android intern, with a monthly salary of only 3K, five insurances and one housing fund, nothing! Well, you read that right, I am a 3K intern. Maybe you think I am joking, but this is the fact. Because of my willfulness in college, I still have I failed two subjects: Advanced Mathematics and Advanced Mathematics, so I haven’t gotten my diploma yet... I’m very disappointed, right? I thought who wrote this set of textbooks Daniel, he turned out to be an intern, haha~

Well, let’s talk about your current Android technical level:

Mid-to-lower, or even lower-middle, you can complete small projects alone! But when it comes to architecture, it’s just a shit comparison and I don’t even think about it. Reuse and the like can be said to be arbitrarily pieced together garbage. I have heard of many emerging technologies but have not taken the time to study them...

Let me talk about my work experienceBar:

2015.2

The school’s Spring Festival job fair, I found my first internship at an outsourcing company in the Gongbei Cross-border Industrial Zone. It might as well be called a studio, with only 7 people in total, and later an HR person was hired. After staying in this company for a month, what I have learned is: I learned to read the official API documentation instead of reading Li Gang; I learned to change Hosts; I learned how to use Fragment; Wrote the UI of Andy Lau Fan Club APP; did various odd jobs; They have their own set of things, which actually puts some commonly used functions into a Jar package, such as asynchronous loading of images. Dynamic calculation of image size, etc...Ask what functions you want at the back, yes, there is no documentation...All APPs follow the same routine. Maybe outsourcing companies are like this, they only care about the results and not the process. What’s more, what I find most unacceptable is testing. Ask me and the artist to draw the screen there, as long as the program does not crash, this is called testing6.jpg... So, I left the company. At this time, I spent 2.8k as an intern and 3.2k as a full-time employee!

2015.4

Then I found another job, at Tsinghua Science and Technology Park. This was no longer an outsourcing company. They mainly I work in the security and smart home fields, and the atmosphere is pretty good. Occasionally, there will be discussions on technical issues, and there will be technical exchanges on Friday afternoons. They also gave me a new computer and monitor, and I feel like I will definitely have a lot of fun staying here! In the first month, look at the documents and so on. Looking at the projects we are about to take over, we can see that we were living a happy life in my childhood, but the good times did not last long. The old employee who had been working for three years was leaving! The two projects he was working on were thrown to me, and I had to start another new project. This is okay, just barely. I can handle it, but one of the two projects I took over needs to be modified and released. I haven't even had time to get familiar with the code yet... How to play You have to come here, I can’t do it myself, and I don’t want to waste time. When the deadline is up, I haven’t accomplished anything, and I’m dragging others down! I remember that the week before I wanted to resign was very depressing. By chance, I think it was Wednesday afternoon. I received a call from the HR of my current company. Then I had a phone interview with my current manager. I asked him some basic questions about Android. The conversation was pretty exciting, and then I made an appointment. We met at a certain time, and then came over for an interview on Friday. Then we talked about some of the current situation of the company. My first impression of the company was The environment was okay, and the seats were relatively spacious. Then I told him that I hadn’t gotten my diploma yet, and could I become a full-time employee? Maybe it was because he was so cool at the time and said it was okay to just talk to the HR department... However, I have been here for half a year and am still an intern... Then I went back to the company on Monday and submitted my resignation application, and then left the second company. After one month in this company, I expanded a bit. With my own vision, I know NDK and video codecs. At this time, I tried 3.8k and switched to 4.2k!

2015.5

Well, after quitting my job at the second company, I had fun at school for a week, casually setting up my own graduation project. That’s it, I was forced to split the project into two applications: Sponge Table and Together. Now it seems that those two things I wrote, I couldn't look straight at it, so I sold Bishe for 200 yuan... Then I came to the current company on Monday and took over the project again. It turned out that the expert in Android development here was I want to jump to Meizu and feel Daniel's breath for the first time. What if he didn't leave but continued to stay? Maybe I will have a different ending at this time, right~ Transitioning from SVN to Git, transitioning from the graphical interface to the command line; I got to know annotations, RxJava, okhttp, github, multi-channel packaging, etc. After spending a week happily together, Daniel left. The next step is to look at the project myself. It feels like I have arrived in a new world. There are many things I have never seen before. After nearly a month of excitement, the company hired another Android developer. I heard at first that he had three years of work experience. I felt like someone was taking me flying, but contrary to my expectations, I didn’t feel the aura of a big cow on him. It felt like maybe I have been in this industry for three years, and my level is very average. If compared to myself, I might have more business experience. When I discuss it with him, he will listen. I’ve never heard of it, and I don’t know about Android Studio, let alone other things. I remember once asking him how to use a simple control. Customization, his answer was: Just find it online and modify it to use it. What I want to ask is the idea of ​​​​implementation, and the answer is: Just know how to use it... okay! After three years, he must have taken over the project, and the manager gave me another project. A mobile phone is attached to a drone to measure the angle of the base station antenna and other information, and then displayed to another mobile phone on the ground through WiFi. The mobile phone's own data collection and data transmission are nothing. The difficulty is serial communication (FTDI) thing, the mobile phone Connect the microcontroller through the OTG line to complete the command sending and receiving. After reading the API documentation for a week, I can't even write the simplest demo. The same situation lasted for another week. Well, I felt really uncomfortable not being able to write anything. Then I couldn’t help it. I can only decompile other people's apk. I spent two days extracting the most critical parts of the code in other people's apk, from more than 6,000 lines The code turned into more than 500 lines of code. Seeing the transceiver lights on the microcontroller flash, it felt quite satisfying!It's a pity that the good times did not last long. The manager said that he would add a real-time video playback. I really... I have never done this thing before. How to play it, so I went to I searched several open source video live broadcast projects on Github, and later I found WifiCarema as a research project, and then because I have been struggling with the h264 library compilation problem for almost two months, but it still has not been solved. As a result, the project was outsourced to people in Beijing. Do, um, my first project was castrated like this... Then I made a very simple little thing, and then until now I have been tracking and solving the websocket problem~ Our company does not use a third party for push, but uses socketio ourselves. A push platform is built. The reason for using socketio is that one set can be used for three platforms, iOS, Android, and On the web side, there was a problem of missing packets or not receiving location updates. The cause of the problem has not been found yet. We can't even reproduce the problem. We've been testing it here without any problems, but as soon as it's delivered to the customer, there are all kinds of problems... I'm still struggling with this issue... I've been here for half a year, and I'm still an intern. The internship salary is 3k, and my graduation certificate won't be available until June next year at least. I got it, and I probably won’t be able to become a regular employee, alas..

Well, the above is some of my situation from this year to now. I went to Chasing Dreams for an interview some time ago, and I talked about myself with the interviewer. Regarding the current situation, he said that he felt that I had gone astray and that many things had gone astray. Then he told me about the year after graduation. It’s very important. Once it’s established, it will be difficult to change. Then we talked about some structural things. Well, it was the first time I wanted to join a company so much. Even if I have to intern for two months, well, unfortunately, I didn’t get the offer, but I am also very grateful to Master Quan Qi for giving me After taking a class, I finally knew what I wanted to learn next~ Then I interviewed two more companies, but I didn’t feel like it was me. The type I aspire to, and I finally applied for a wave of Meizu interns. Haha, I didn’t even get a chance to interview. This is the first time, I guess. HR hasn’t even seen my resume~7.gifThe above is a description of some of my personal circumstances. I am really an intern with only 3K, so everyone in the group has 10K Gentlemen, don’t call me a poor person and give out red envelopes during the holidays...8.jpg


3. Some self-study experiences and resource sharing

How? Learning Android, this is probably the most common question asked by beginners. Through the above, you also know how shitty Piggy is. So the following are just my simple opinions on self-study. If you don’t like it, please comment~

1) Read books

Recommended books for beginners:

  • First Line of Code》: Needless to say, this book is written by the great master Guo Lin and is a must-have for beginners
  • Android Heroes Biography》: This book is written by a doctor (Xu Yisheng). Hey, I bought it on Double 11 and just received it today. After flipping through it, I feel that the content is quite simple, suitable for reading the first book, or knowing how to use Android~

Some friends may say that there is also Li Gang's Android Crazy Lecture Notes... Well, you can also buy it and use it as a dictionary. But I feel that reading the above two books will help you get started faster. In addition, you can also cooperate when reading the first line of code. Take it together with the basic introductory tutorial written by Xiaozhu, the effect will be better~

Advanced recommended books:

are also the next few books I want to buy:

  • "Android Source Code Design Pattern Analysis and Practical Practice": He Honghui (Simple Brother) and Guan Aimin (Ai Brother)'s masterpiece, you can learn both After learning about design patterns, you can also experience some of the design ideas contained in Android!

  • "Exploration of the Art of Android Development": Ren Yugang, focusing on the systematization of Android knowledge and the analysis of the system working mechanism

  • In-depth analysis of the Android 5.0 system》: Analyzes the principles and specific implementation of the main framework of the latest Android 5.0 system~

I haven’t touched the above books (I haven’t started yet) ), are several well-received books ~ I also recommend them here!

2) Watch the video

There are many video tutorials about Android on the Internet, here are the dark horses recommended by Jishen Tutorial:

Dark Horse 28-issue Android full video unencrypted full version: Password: h7jz

##52-issue unencrypted version: Password: zve8

Of course, the following video learning websites are also very good. I also recommend

MUOC网

Geek Academy

Wheat Academy

3) Read other people’s technical blogs

4) High-quality Android community

5) Official learning website/Wiki

  • ##Android Developer
  • Android Developer (no ladder required)
  • Android Training Chinese version
  • Material Design Chinese version
  • Android Weekly Chinese version
  • Geek Academy Wiki
##6) Code/project download

Well, most of the time I choose to search on Github. There are many open source third parties. The following one must be starred:

Android open source project classification summary

Then the author Let me also share some codes that I spent more than 50 yuan on a certain treasure:

5000 sets of Android source codes

Password: 6we63175 sets of iOS source codes Password: 53v9 A lot of the code above is repetitive, and most of it is based on Eclipse. It covers a wide range of topics, so check it out!

7) Ladder tool

Well, if you don’t want to change hosts frequently or buy a vpn, but want to use Google, then you can use Lantern ~ Search for "Lantern" and download it yourself~

8) Some other random thoughts:

Well, most of the above resources come from: Android Learning Resource Website Collection, please be sure to Star! ! ! Follow-up if Any new resources will be updated on it. You are also welcome to share some of your own collections. The content above is Xiaozhu Written by Ji Shen, the biggest player in the group, and of course B God, Cao Shen, Street God, etc. Thank you very much for your continued support to me. Some guidance and help~9.gif

I don’t know if you saw the above resources, collect them, buy them, buy them~

What I want to say is, I collected them. If you don’t look at it, it’s just a URL; if you download it and don’t look at it, it’s just a bunch of data; If you buy a book but don’t read it, it’s just a pile of paper! Don’t let yourself look like you’re busy and working hard. Who are you showing off to? What you learn is your own. I like this sentence very much: "The fairest and cruelest reason for the road to technology is: there are no shortcuts, it requires accumulation over time and a long-lasting passion for technology." I still remember the TEDx speech given by Luo Zixiongzi, the shooting angle design director of Smartisan Technology, a long time ago: "How to Become an Excellent Designer" said something like this: Gladwell pointed out in the book "Outliers": "Genius in people's eyes is not extraordinary, but continuous hard work." effort, Ten thousand hours of training are the necessary conditions for anyone to transform from ordinary to extraordinary. "Ten thousand hours, which means you work 8 hours a day, Work 5 days a week and you'll need 5 years. You don’t need to be a genius, you don’t need to have extraordinary IQ, you don’t need to have three heads and six arms, you don’t need to have horns on your head, you just need to persist With continuous and persistent efforts and the right methods, you will be able to stand alone in the design field and a profession. Although he was talking about design, many things are similar. Hehe, he served a big bowl of chicken soup ruthlessly~ To sum up, self-study is nothing more than: Read more books, read blogs, do projects, look at source code, constantly summarize and reflect, and structure what you have learned!


4) Some questions and answers

The following are some questions frequently asked by readers. Here are the unified answers:

1 .I have studied XX before or I am not engaged in programming. I want to learn Android. Can I learn it well? Questions like that! Answer: Some time ago, I saw on the Sina Weibo of a doctor (Xu Yisheng) that a 65-year-old man came to his company to ask him a question. Android Studio, seeing this, do you think the above problem is a problem?

2.XXX reported an error? Questions like what to doAnswer: This is the most frequent. In fact, many of the answers can be found on Du Niang or Gu Ge. Is it possible that so many people are working on Android? Have you ever had this problem alone? Or go to Stackoverflow to ask questions, etc., first search and think about it yourself, and then go Ask someone else! ! ! And others have no obligation to answer your questions. Don’t act as if it’s nothing if others don’t answer your questions. Then he said bad things! Pay attention to the skills of asking questions, organizing the language, posting logs, error location codes, etc.!

3. I want to add Xiaozhu as a friend, why did I refuse? Answer: I don’t know where you saw my QQ, and then read what I wrote, and you are eager to add me as a friend. I want to ask, after adding it, what next? Is it easier to ask questions? When I first started joining me, I usually asked questions. I will answer the questions patiently every time, and then you will start to rely on me. Whenever you have a problem, you will come to me... One or two is fine. Slowly, there were more and more people, and I basically spent my time answering questions every day. As a result, I didn't accomplish anything at the end of the day... It’s not that Xiaozhu is cold or looks down on beginners, I have my own things to do, I hope you can understand me! If you have any questions, you can ask them in the group. The managers are very enthusiastic. Of course, the premise is that your questions are not too popular. Found it...don't be a thief! ! !

4.After writing the basic introductory tutorial, when will you start writing the advanced tutorial? Answer: Everyone’s feedback on the basic introductory tutorial is that it is well written, and it has also received a lot of praise and praise. Thank you very much~ As for the advanced tutorial, I briefly conceived it during the process of writing the basic introduction. I used Baidu Mind Map to make an outline:

10.png

At that time, I thought about taking a break after writing the introduction. One month, and then I start writing the advanced series, about one topic a month. However, the advanced part may not be written further. You may be confused, why not write it? Let me be honest about some of my difficulties:

First of all: the time spent writing tutorials. A simple tutorial takes at least more than 2 hours of my time, despite the content. It's relatively simple, but if it's more complicated, I may need to spend 2 or 3 days! Writing tutorials is different from writing notes. It needs to be described clearly. Write examples, post running effects, etc. Just understand the notes yourself, but you have to let others understand the tutorials...

Then the following is : My progress is slow. After writing this set of basic tutorials, compared with me before writing, I have not made much progress; It's still the same level as before... Every time I go to an interview, I come back and talk about those shabby projects, which is not interesting at all. I want to spend some time doing something. There are so many things I want to learn. For example, I started to get in touch with rxjava in May, and then Now that the streets are in ruins, I only know how to play the simplest way~Finally, : Writing tutorials will not bring me any income. As mentioned above, I am a 3K intern dog, and writing this set There is no income from tutorials, and occasionally a few dollars are given to Qiniu every month, because the pictures are all from Qiniu. Picture Browser, that evil crawler website, crawled all my articles without indicating the source, and then downloaded my pictures... This is the download traffic from October to November! 11.png

I am not the second generation of rich people. I remember I said before that my father suffered from depression and was unable to work. My mother stayed with my father in my hometown. That is to say, I have no source of income. Fortunately, my dad survived and I no longer have to pay 20,000 tuition fees every year; Although my monthly salary of 3k can sustain my life, as the eldest son of the family, I have to shoulder the responsibility of the family! After all, I still have a younger brother and younger sister who are studying in college. If I could have a diploma, my current situation might be better! Forget it, what’s past is past, what’s more important is the future! I also want to study new things every day and then write about them Tutorial, but ideals are always beautiful, but reality is often cruel, and I have to live. In addition, when it comes to the title of blogging expert, many friends like to use this title to criticize me, but in fact it is of no great use. If you create more than 10 original articles every month, you will receive only one book. Most of them are old books from the C Coin Mall...

5.Little Pig Next What do you want to do? Answer: Come on a quick trip, have fun for a month, and then wait for the Chinese New Year! Okay, I think so too, but it’s a pity that I don’t have any money in my pocket. In the coming days, I want to thoroughly study the company’s projects, fix the bugs, and then learn something. As for other things, I will continue to write some gadgets for fun, save money to buy a mechanical keyboard (ikbc G104), and review advanced mathematics in preparation for January. Make-up exams, etc., and then after the New Year, I might go to Shenzhen to look for opportunities~ I might occasionally update one or two articles. But don’t expect too much. It’s not that I won’t write the advanced series. I just won’t write it for the time being. When I find a stable job, I’ll have it. Once you have certain financial ability, start writing again~


Acknowledgments:

Well, okay, I finally vomited out everything in my stomach~

12.gif

According to the general routine, I must say a lot, thank you ccav and the like, eh! Thank you to FK, the webmaster of w3c Bird's Nest, for carefully formatting each article, and to the Ji Shen, B God, Street God, Cao Shen, etc. in Xiaozhu's Secret Base. Technical support, as well as all the friends who have been silently supporting Xiaozhu, I would like to sincerely say thank you~ Okay, that’s all. I would like to take this article to commemorate my nearly two years of csdn blogging career~

13.gifEnded Scattered Flowers~ is the end and the starting point

to be continued... To be continued