References:
https://developers.google.com/android/for-all/vocab-words/
https://www.objc.io/issues/11-android/android_101_for_ios_developers/
1. Gradle
A?computer?is a machine that follows a list of instructions called a?program. An?Android device?is a computer, and an?app?is a program.
Even the simplest app consists of dozens of files of instructions, plus accompanying?resources?such as image files. We create these files and resources using a desktop application called?Android Studio.
When we're finished, our instructions and resources need to be packaged into a form that our Android device can understand. Android Studio delegates this task to a tool called Gradle. Gradle translates our instructions into a language that's easier for the Android device to understand, and compresses our translated instructions and resources into a file called an?APK, or Android package. The APK can then be copied to your Android device and run there.
2. Activity
A?computer?is a machine that follows a list of instructions called a?program. An?Android device?is a computer and an?app?is a program. Inside the device are containers called?variables?that hold?values?such as numbers or pieces of text.
A big variable that can contain smaller variables is called an?object. An object can also have lists of instructions attached to it — in effect, little programs — called?methods. When we execute the instructions of a method, we say that we are?calling?the method.
There are many?classes?of objects, and one class is named?Activity. When an app is launched, an object of this class is automatically created, and then one of the object’s methods, named?onCreate, is called. The instructions of this method tell the device to create and display a?user interface?for the app. This interface consists of areas on the screen that display information, and touch-sensitive areas such as buttons.
Other methods of this Activity object are called automatically when the user interface of this app is covered by another app, for example when the phone starts ringing. A final method,?onDestroy, is called when the app’s user interface is no longer needed and can be destroyed. onCreate is the first of these?lifecycle methods?of the Activity object.
3. Fragment
The?Fragment?concept is unique to Android and came around somewhat recently in Android 3.0. Fragments are mini controllers that can be instantiated to fill activities. They store state information and may contain view logic, but there may be multiple fragments on the screen at the same time – putting the activity in a fragment controller role. Also note that fragments do not have their own contexts and they rely heavily on activities for their connection to the application’s state.
Fragments allow you to break up your UI and controller logic into smaller, reusable chunks. But beware! The fragment lifecycle, detailed below, is more nuanced.
Fragments allow you to break up your UI and controller logic into smaller, reusable chunks. But beware! The fragment lifecycle, detailed below, is more nuanced.