Pro Android with Kotlin


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

14
CHAPTER 3: Activities
Declaring Activities
To declare an activity, you can write the following inside AndroidManifest.xml, for example:

package="com.example.myapp">


...

...

As shown in this particular example, you can start the name with a dot, which leads
to prepending the app’s package name. In this case, the full name of the activity is
com.example.myapp.ExampleActivity. Or you can write the full name, as shown here:



"com.example.myapp.ExampleActivity" />
...

...

All attributes you can add to the  element are listed in the section “Activity 
Related Manifest Entries” in the online text companion.
The following are elements that can be child elements inside the activity element:


This is an intent filter. For details, see the online text companion at “Activity-
Related Manifest Entries”. You can specify zero, one, or many intent filters.


Starting with Android 7.0, you can specify layout attributes in multiwindow 
modes as follows, where you of course can use your own numbers:
android:defaultWidth="600dp"
android:gravity="top|end"
android:minHeight="450dp"
android:minWidth="300dp" />
The attributes defaultWidth and defaultHeight specify the default dimensions, the attribute 
gravity specifies the initial placement of the activity in freeform modes, and the attributes 
minHeight and maxHeight signify minimum dimensions.



Download 5.42 Mb.

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




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