Pro Android with Kotlin



Yüklə 4,6 Kb.
Pdf görüntüsü
səhifə24/231
tarix29.11.2023
ölçüsü4,6 Kb.
#138831
1   ...   20   21   22   23   24   25   26   27   ...   231
@de android telegram Pro Android with Kotlin Developing Modern Mobile

9
CHAPTER 2: Application
This 
.dex
file contains the compiled classes in 
Dalvik Executable
format, something that is 
similar to a JAR file in Java.
We will be talking about app-related artifacts shortly, but first we will be looking at the more 
conceptual idea of what tasks are.
Tasks

task
is a group of activities interacting with each other in such a way that the end user 
considers them as the elements of an application. A user starts an app and sees the main 
activity, does some work there, opens and closes subactivities, maybe switches to another 
app, comes back, and eventually closes the app.
Going a bit more in-depth, the main structure a task exhibits is its 
back stack
, or simply 
stack
, where activities of an app pile up. The standard behavior for simple apps in this stack 
is that the first activity when you launch an app builds the 
root
of this stack, the next activity 
launched from inside the app lands on top of it, another subactivity lands on top of both, and 
so on. Whenever an activity gets closed because you navigate back (that is where the name 
back stack
comes from), the activity gets removed from the stack. When the root activity 
gets removed, the stack gets closed as a whole, and your app is considered shut down.
Inside the 

element of the 
AndroidManifest.xml
file, in more detail described 
in section “The Application Declaration” of the online text companion, we can see several 
settings altering the standard behavior of the task stack, and we will see more in Chapter 
3
. This way, a tailored task stack can become a powerful means to help your end users to 
understand and fluently use your app. Keep in mind that a complicated stack behavior might 
be hard to understand for users beginning to use your app, so it should be your aim to find a 
good balance between power and ease of use.
The Application Manifest
An important central app configuration file you can see in any Android app is the file 
AndroidManifest.xml
. It describes the app and declares all the components that are part of 
the app. The outline of such a manifest file might look like this:
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package="de.pspaeth.tinqly">
...
android:allowBackup="true"
android:icon="@mipmap/my_icon"x
android:label="@string/app_name"
android:roundIcon="@mipmap/my_round_icon"
android:supportsRtl="true"
android:theme="@style/AppTheme">






Yüklə 4,6 Kb.

Dostları ilə paylaş:
1   ...   20   21   22   23   24   25   26   27   ...   231




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə