Android programming begins



  • So, I'm studying the Head First programming for Android, why is it? And because she's new, and I thought I'd avoid a lot of trouble with old-fashioned techniques, libraries, etc. But it wasn't that, in the book, I have to create a ListActivity, but I understand it's already outdated, because now there's a lot of other activities and more men like Master/Detail Flow, but it creates a lot of activity and maquets that doesn't fit the task. Tell me what to do in this case.

    I've got all the projects set up in the deffault with the expansion of appcompatactivity, and in my book, it's just Activity, is something to do with the updates? Who's gonna tell you about this?



  • Let's start by saying that Java, you've been studying most likely not since you started GUI writing in JavaFX and organizing client-serious engagement, but from the very foundations and the best examples in the console. In teaching Android development, you should do the same - do simple examples, gradually complicating tasks. In fact, the Android Freamwork is a separate eco-system that only uses Java to write the code the whole thing requires separate learning from zero.

    I'd advise you on the book from BigNerdRanch: http://www.ozon.ru/context/detail/id/135513511/ - it's probably the only decent book in Russian for a newcomer. The training is based on a specific task (some annex) and a step by step, with detailed explanations, the task is being pursued. As a result, you will write a real working annex (all of them, if I don't change my memory, the originals of all the applications are available on GitHub and easily listed) and even understand how to do it. The same book will give you a holistic view of the application device and the interaction of its parts, as opposed to the reference books or Internet lessons, where separate information on individual elements is provided, leaving it to think about how to put it into the working and not scary others who see the code, annex : With a little bit of effort, you can find a free electronic copy of this book.

    About old classes or heirs. What's in real design ListActivity You'll probably have to, no matter how old she is, because she's the least flexible on the list, we'll be down here.
    Here's the thing, the core class of the Android applications screen is class. Activity♪ Using this class alone, you can certainly perform all the necessary function. From base Activity Classes only add a little functionality, for example ListActivity runs the listener and facilitates the connection of the marking, mainly in the normal activation of several lines of the code. With regard to AppCompatActivity - it's designed to support Material Design (up to Android 5.0, where defolt design is) together with the support library AppCompat and ensure collaboration ActionBar with this support library. I don't think the designer's research is a top priority at the beginning of the training, but it's important for you to learn how to work with the Freamworth, you'll always be able to steal. It should also be noted that if you're not going to disseminate your lessons, there's no need for feedback.
    At the beginning of the training, it is not necessary to draw attention to the obsolescence of information or classes - the principles in the database remain unchanged and there is nothing in the new "new" classes. On the contrary, understanding of the old class would make it easier to use "new" because you only need to understand that (and why) added. In the case of a AppCompatActivity In general, with some minor reservations, it may be considered for ActivityI mean, it's tantamount to use.

    So in the study projects, you can use the class with confidence. ActivityListActivity and any other that is required to understand the assignment without drawing attention to its outdated nature. When you understand the principles of working with the Freamworth is enough to write your own application, you can easily determine which type of activism you need for every single screen, you don't need to be so excited right now. If you're embarrassed by the default creation activate, then just delete the first nine letters. extends Activityand change the subject of the AppCompat application to some Holo or ignore it at all-- AppCompatActivity Naturally, all basic methods are being applied. Activity and the work of the example will not be affected, as a rule.

    On the scoreboards, the only template to be used - Blank Activity, for which the rest remain secret to the family by seals:) - the newcomers will not be able to force them because of extreme overloading, a man who has experienced everything on his own, as he needs for a specific task, is easier than adapting another person to prepare himself. All these templates are extremely redundant and unnecessarily complicated.

    About Java's knowledge level. The availability of basic language capabilities at a good level is sufficient to produce a full application. The most relevant is the knowledge of the Freimvor itself, its classes, the structure of the applications, interaction with the system, the principles of the cloths, etc. In particular https://ru.stackoverflow.com/a/432813/177345 causing many misunderstandings at the beginning.

    Google created a very good portal. https://developer.android.com/index.html?hl=ru which includes both a full description of API and many hydes, examples and instructions. Besides, you'll always get the most relevant information, in particular. https://developer.android.com/reference/android/support/v7/app/AppCompatActivity.html AppCompatActivity base Activity (a brief description and what methods have been added to the inherited and, by the way, draw attention to the chain of succession). It would be a pleasant bonus that the portal was actively translated into Russian and many articles could be read in their own language. I advise you to study it very carefully after reading the book above and gaining an initial understanding of the principles for the development of the Framworth. Start. https://developer.android.com/guide/index.html?hl=ru

    Well, there's a lot of answers here, as well as people who are always willing to answer a good new question.

    PS: If any points are not sufficiently understood, write in the comments, add the answer.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2