Pro Android with Kotlin



Yüklə 4,6 Kb.
Pdf görüntüsü
səhifə27/231
tarix29.11.2023
ölçüsü4,6 Kb.
#138831
1   ...   23   24   25   26   27   28   29   30   ...   231
@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.



Yüklə 4,6 Kb.

Dostları ilə paylaş:
1   ...   23   24   25   26   27   28   29   30   ...   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ə