其他分享
首页 > 其他分享> > Learn Android Programming How to build Android app using Kotlin

Learn Android Programming How to build Android app using Kotlin

作者:互联网

All icons were sourced from here and are free for commercial use with attribution

Getting started

An introduction to Kotlin and Android programming

Q:Why use Kotlin if it is so similar to Java?
A:In short, Kotlin is concise, expressive and safe. Kotlin creates powerful applications that perform well and are easy to maintain. The benefits of Kotlin are such that in 2019 Google announced that Kotlin is the preferred programming language for Android applications.

For now, it is sufficient to understand the following key concepts:

The lifecycle of Android activities and fragments:

At runtime, an activity will cycle between several states in a sequence called the Android activity lifecycle, as summarised in the below diagram:
image

At either the onPause stage or the onStop stage, the activity can reenter the foreground state if the user returns to the activity.
An important consideration for activities that enter the onPause and onStop stages is that those activities may be killed if there is insufficient memory to keep them running in the background.

As mentioned previously:

Installing Android Studio

Android Studio is the official development environment for building and testing Android apps and is available for Windows, macOS and Linux operating systems.

Download Android Studio fromAndroid’s website

标签:fragment,Kotlin,app,user,activity,Android,stage
来源: https://www.cnblogs.com/tlo-liangjiajia/p/16005673.html