Pro Android with Kotlin


Download 5.42 Mb.
Pdf ko'rish
bet26/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   22   23   24   25   26   27   28   29   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile

11
CHAPTER 2: Application
All elements possible as children to the  element are listed in the section 
“Manifest Top Level Entries” of the online text companion. The most important one, 
, describes the application and gets covered in detail in the section
“The Application Declaration” of the online text companion.


13
© Peter Späth 2018 
P. Späth, Pro Android with Kotlin, 
https://doi.org/10.1007/978-1-4842-3820-2_3
Chapter
3
Activities
Activities represent user interface entry points of your app. Any app that needs to interact 
functionally with the user in a direct way, by letting the user enter things or telling the 
user graphically about the functional state of an app, will expose at least one activity to 
the system. I say functionally because telling the user about events can also happen via 
notifications through toasts or the status bar, for which an activity is not needed.
Apps can have zero, one, or more activities, and they get started in one of two ways:

The main activity, as declared inside AndroidManifest.xml, gets started 
by launching the app. This is kind of similar to the main() function of 
traditional applications.

All activities can be configured to be started by an explicit or implicit 
intent, as configured inside AndroidManifest.xml. Intents are both 
objects of a class and a new concept in Android. With explicit intents, 
by triggering an intent, a component specifies that it needs something 
to be done by a dedicated component of a dedicated app. For implicit 
intents, the component just tells what needs to be done without 
specifying which component is supposed to do it. The Android OS or 
the user decides which app or component is capable of fulfilling such an 
implicit request.
From a user perspective, activities show up as things that can be started from inside an 
application launcher, be it the standard launcher or a specialized third-party launcher app. 
As soon as they are running, they show up in a task stack as well, and users will see them 
when using the Back button.



Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   22   23   24   25   26   27   28   29   ...   223




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling