A
A
Anatoly2018-03-28 16:52:30
Android
Anatoly, 2018-03-28 16:52:30

How to learn by API (android)?

Hello, I am learning from the book "Android. Programming for Professionals" 3rd edition. Reached the 27th chapter.
At the same time I read Java for beginners Schildt.
I constantly experience difficulties when tasks do not relate to the material of the book, that is, you need to climb developer.android.com and use it.
For example, now I'm trying to figure out how to make a loading indicator (with an indefinite state), I remember that there was such a thing in the parameters of AsyncTask and I go to AsyncTask , I find there onProgressUpdate(Progress...) and read...

Called on the main thread, after publishProgress(Progress...) has been called. Execution timing is not defined. This method is used to display some form of progress on the interface while background tasks are in progress. For example, it can be used to animate the loading bar or show logs in a text field. - My translation

I go to publishProgress(Progress...) there is also 3 lines of information and no examples.
It is clear that I can peep solutions on stackOverflow, but is this correct? I think I should learn how to use the official tools. I feel uncomfortable constantly jumping for ready-made examples.
Tell me, please, who went through this, how did you solve this problem?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
Roman, 2018-03-28
@TonyWrong

So look at someone else's code, figure it out and write it yourself. If the source code did not give an understanding of how it works. Only without copypasta.
What is the problem :) There is nothing shameful in this. Searching for information is also not a trivial task, given how much garbage you need to weed out.
This also needs to be learned.

I
Ivan0206, 2018-03-28
@Ivan0206

Same problem, sometimes you feel inferior. But when you're learning, you always need practice. When you taught mathematics or physics at school, you also relied on examples of how this or that equation is solved. Accumulate a base, when you understand what happens during compilation and which line of code is responsible for a particular process, you will start writing code yourself. It is impossible to know everything, one way or another you will google.

A
Anton Tikhomirov, 2018-03-28
@Acuna

Theory without practice is dead, as you know, so you need to code, otherwise you won’t learn. Androyd has really shitty docks, I've been climbing there a couple of times for all the time, so the ideal option is to look for answers on SO, there is always a code for solving a particular problem. But it also has a minus: a large number of Hindus with the appropriate quality of the code, so in order to start actively using it, by this time you already need to somehow understand at least the logic of the language in order to rewrite the code from Hindu to normal right away at the time of adding it to the project, so as not to waste time on refactoring later. You can also take the source code of open source projects, but it is very difficult for a beginner to understand someone else's noodle code, and even more so to look for solutions.

T
tema_sun, 2018-03-28
@tema_sun

It is clear that I can peep solutions on stackOverflow, but is this correct?

If you just go to SO and copy/paste the solutions, it's wrong. If you understand what they offer, then ok.

L
lomikman, 2018-03-28
@lomikman

What else AsyncTask, 2018 is in the yard. They don't do anything on asynctask. Sequentially completing
tasks from prehistoric and translated books is the slowest way to learn.

It is clear that I can peep solutions on stackOverflow, but is this correct?

This is the most important and frequent thing that you will do as a typical android developer, google and look for solutions, save time and quickly solve problems for business, and not cut your bikes.
If something doesn’t work out, then you need to a) debug 2) insert logs 3) watch sorts android sdk or libraries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question