📜 ⬆️ ⬇️

The book "Android. Programming for professionals "

Hi, Habrozhiteli! We have a new book:

image Authors: B. Hardy, B. Phillips, C. Stewart, C. Marsicano

The second edition will introduce you to the integrated development environment Android Studio, which will help you easily create applications for Android. You will not only learn the basics of programming, but also learn about the capabilities of Lollipop, new tools of the auxiliary libraries, as well as some of the key tools of the standard library, including SoundPool, animation and resources. All educational applications have been designed in such a way as to demonstrate the important concepts and techniques of programming for Android and give experience of their practical application.
')


The novice Android programmer will have to work hard. Learning Android is like living in another country: even if you speak the local language, you still don't feel at home at first. It seems that everyone around you understands something that you have not yet learned. And even that which is already known in the new context is pop-growth wrong.

Android has a certain culture. The media of this culture communicate in Java, but knowing Java is not enough. To understand Android, you need to learn a lot of new ideas and tricks. When you find yourself in an unfamiliar area, it is useful to have a guide on hand.

Here we come to the rescue. We, the employees of Big Nerd Ranch, believe that every Android programmer should:

- write applications for Android;
- understand what he writes.

This tutorial will help you achieve both goals. We trained hundreds of professional Android programmers. We will lead you along the path of developing several Android applications, describing new concepts and techniques as needed. If we encounter any difficulties on the way, if something seems too complicated or illogical, we will try to explain how this state of affairs arose.

Such an approach will allow you to apply the obtained information straight off - instead of having accumulated a lot of theoretical knowledge, to understand how to use it in practice. Turning the last page, you will have the experience necessary for further work as an Android developer.

Prerequisites

To use this book, the reader must be familiar with the Java language, including concepts such as classes and objects, interfaces, listeners, packages, inner classes, anonymous inner classes, and generic classes.

Without knowledge of these concepts, you will feel in the jungle starting on the second page. Better start with an introductory tutorial on Java and return to this book after reading it. There are now many excellent books for beginners; Choose the right option depending on your programming experience and learning style.

If you are well versed in the concepts of object-oriented programming, but have managed to forget Java a little, then most likely everything will be fine. We provide brief reminders of some of the specific features of Java (such as interfaces and anonymous inner classes). Keep your Java tutorial ready in case you need additional information while reading.

What's new in the second edition?

The second edition shows how to use the Android Studio integrated development environment to write applications for Android 5.1 (Lollipop) that are backward compatible with Android 4.1 (Jelly Bean). It also describes in more detail the basics of programming for Android, examines new features of Lollipop (such as the toolbar and material design), new tools of auxiliary libraries (including RecyclerView and Google Play Services), as well as some key tools of the standard library, including SoundPool, animation and resources.

How to work with a book

This book is not a reference book. We tried to help overcome the initial barrier so that you can get the most out of existing reference books and recipe collections. The book is based on materials from a five-day training course at the Big Nerd Ranch. Accordingly, it is assumed that you will read it from the very beginning. Each chapter is based on previous material, and skipping chapters is not recommended.

In our classes, students study these materials, but other factors are also involved in the training - a special classroom, good food and a convenient blackboard, a group of interested colleagues and a teacher who answers questions.

It is desirable that your learning environment was similar to ours. In particular, you should sleep well and find a quiet place to work. The following factors also come in handy:

- Create a study group with friends or colleagues.
- Allocate time when you will be engaged exclusively in reading the book.
- Participate in the work of the book forum on the website forums.bignerdranch.com .
- Find an Android Specialist to help you at a difficult time.

Book structure

In this book, we will write eight applications for Android. Two applications are very simple, and only one chapter is spent on their creation. Other applications are often more complex, and the longest application takes eleven chapters. All applications are designed to demonstrate important concepts and techniques and give experience of their practical application.

GeoQuiz - in the first application, we explore the basic principles of creating Android projects, activity, layouts and obvious intents.
CriminalIntent - the largest application in the book is designed to store information about the misdemeanors of your colleagues in the office. You will learn how to use fragments, interfaces “main-detailed view”, list interfaces, menus, cameras, implicit intents and much more.
BeatBox - horror your enemies while you learn more about snippets, playback of multimedia content, themes and graphic objects.
NerdLauncher - non-standard launcher will reveal the subtleties of the system of intents and tasks.
PhotoGallery is a Flickr client for downloading and displaying photos from the public Flickr database. The application demonstrates working with services, multi-threaded programming, accessing web services, etc.
DragAndDraw — this simple graphical application deals with handling touch events and creating custom views.
Sunset - in this "toy" application you will create a beautiful view of the sunset over the water, and at the same time master the subtleties of animation.
Locatr - the application allows you to contact the Flickr service for images of the neighborhoods of your current location and display them on a map. You will learn to use the service and maps of the card.

Exercises

Many chapters end with an exercise section. This is your opportunity to apply the acquired knowledge, delve into the documentation and work out the skills of self-solving tasks. We strongly recommend doing the exercises. The ability to get off the beaten path and find your own path will secure the training material and give you confidence in working on your own projects.

If you find yourself at a dead end, you can always contact the forums.bignerdranch.com forum for help .

Are you inquisitive?

At the end of many chapters there is also a section “For the curious.” It provides in-depth explanations or additional information on the topics presented in the chapter. The content of these sections is not absolutely necessary, but we hope that it will seem interesting and useful to you.

Programming style

There are two key points in which our solutions differ from those commonly found in the Android community.

We use anonymous classes for listeners. Basically this is a matter of taste. In our opinion, the code is more slim. The implementation of the listener's method is placed directly where you want it to be. In high-performance applications, anonymous inner classes can create problems, but in most cases they work fine.

After getting acquainted with the fragments in Chapter 7, we use them in all user interfaces. Fragments are not absolutely necessary, but, in our opinion, this is a valuable tool in the arsenal of any Android developer. When you get comfortable with fragments, it’s easy to work with. Fragments have obvious advantages over activities, including flexibility in building and presenting user interfaces, so it's worth it.

Android versions

In this book, Android programming is covered for all common Android versions. At the time of this writing, this is the version of Android 4.1 (Jelly Bean) - Android 5.1 (Lollipop). And although the old versions of Android continue to occupy a certain share of the market, in our opinion, for most developers, the efforts to support these versions are not justified. For additional information on support for Android versions prior to 4.1 (especially Android 2.2 and Android 2.3), please refer to the first edition of the book.

Even after the release of new versions of Android, the techniques outlined in the book will work thanks to the Android backward compatibility policy (for details, see Chapter 6). The site forums.bignerdranch.com will publish information about the changes, as well as comments about the use of material from the book with the latest versions.

More information about the book can be found on the publisher's website.
Table of contents
Excerpt

For Habrozhiteley a 25% discount on the coupon - Android Programming

Source: https://habr.com/ru/post/279289/


All Articles