Stay organized with collectionsSave and categorize content based on your preferences


Tip: To debug your layout at runtime, use the Layout Inspector tool. Write the XML


Download 0.65 Mb.
bet2/19
Sana08.06.2023
Hajmi0.65 Mb.
#1464194
1   2   3   4   5   6   7   8   9   ...   19
Bog'liq
Layouts

Tip: To debug your layout at runtime, use the Layout Inspector tool.
Write the XML
Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they contain, in the same way you create web pages in HTML — with a series of nested elements.
Each layout file must contain exactly one root element, which must be a View or ViewGroup object. Once you've defined the root element, you can add additional layout objects or widgets as child elements to gradually build a View hierarchy that defines your layout. For example, here's an XML layout that uses a vertical LinearLayout to hold a TextView and a Button:

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I am a TextView" />

Download 0.65 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   19




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