android:layout_marginEnd="20dp" Ushbu buyruqda matnni tugash qismidan gorizontal yo’nalishda 20dp surib beradi android:layout_marginVertical="100dp" Ushbu buyruq matnni vertical yo’nalishda 100dp surib beradi.
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:textAppearance="@style/TextAppearance.AppCompat.Display4"
android:textSize="30sp"
android:fontFamily="sans-serif"
android:layout_marginTop="25dp"
android:layout_marginStart="20dp"
android:layout_marginVertical="100dp"/>
Layout_Margin hususiyati qolgan barchasini margin hususiyatlari bilan bir xil
Text hususiyati ham bir xil.
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checked="false"
android:text="Barcha shartlarga roziman"
android:textColor="#513814"
android:textColorHighlight="#513458" android:textAllCaps="true"
android:textStyle="italic"
android:textSize="25sp" />
android:checked="false" Ushbu buyruq true yoki false qiymat qabul qiladi yani aktiv yoki passiv holstda bo’ladi.
android:text="Barcha shartlarga roziman" ushbu buyruq checkboxning matni hisoblanadi
android:textColor="#513814" Matn rangi
android:textAllCaps="true" Bu buyruq true va false qiymat qabul qiladi true qiymat qabul qilsa Barcha harflari katta harflarda bo’ladi
android:textStyle="italic" Ushbu buyuq yordamida harflarning stillarini ko’rsatiladi.
android:textSize="25sp" ushbu buyruq textning o’lchamini ko’rsatadi
<RadioButton
android:id="@+id/radioButton" RB ga id beradi android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checked="true" 2 xil qiymat qabul qiladi true va false Cheked bolganda true aks holda fase android:text="RadioButton" /> RB ni text qismi
Layout_Margin qismlari qolgan elementning shu hususiyatlari bilan umumiy.
Sodda Kalkulyator yaratish
xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="@android:color/holo_red_dark"
android:backgroundTintMode="src_in"
android:visibility="visible"
android:orientation="vertical"
tools:context=".MainActivity">