0% found this document useful (0 votes)
14 views

XML Version

The document describes the layout of a weather app interface using XML tags. It includes tags for text views to display temperature, humidity, wind and other weather details. Image views are specified for icons. Buttons and edit texts are defined to allow user input and switching between screens. The layout uses a linear vertical orientation and nested horizontal and vertical linear layouts to position the elements.

Uploaded by

An Nguyễn
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

XML Version

The document describes the layout of a weather app interface using XML tags. It includes tags for text views to display temperature, humidity, wind and other weather details. Image views are specified for icons. Buttons and edit texts are defined to allow user input and switching between screens. The layout uses a linear vertical orientation and nested horizontal and vertical linear layouts to position the elements.

Uploaded by

An Nguyễn
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

<?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:orientation="vertical"
android:background="#00FFD9"
android:layout_height="match_parent"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<EditText
android:layout_width="275dp"
android:layout_marginStart="2dp"
android:text="City, state"
android:layout_height="48dp"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:id="@+id/butonSearch"
android:layout_marginStart="10dp"/>

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tên thành phố"
android:id="@+id/textviewName"
android:textSize="25dp"
android:layout_marginStart="2dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tên quốc gia"
android:textSize="25dp"
android:layout_marginTop="2dp"/>

<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="2dp"
android:layout_gravity="center"
android:src="@drawable/icon_cloud"
android:id="@+id/imageIcon"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="35dp"
android:text="Nhiệt độ"
android:textColor="#f20"
android:layout_marginTop="2dp"
android:layout_gravity="center"
android:id="@+id/textviewTemp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30dp"
android:text="Trạng thái"
android:layout_gravity="center"
android:layout_marginTop="2dp"/>

<LinearLayout
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">

<LinearLayout
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">

<ImageView
android:src="@drawable/icon_humidity"
android:layout_width="50dp"
android:layout_height="50dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:text="Độ ẩm"
android:id="@+id/textviewHumidity"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">

<ImageView
android:src="@drawable/icon_cloud"
android:layout_width="50dp"
android:layout_height="50dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:text="Mây"
android:id="@+id/textviewCloud"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">

<ImageView
android:src="@drawable/icon_wind"
android:layout_width="50dp"
android:layout_height="50dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:text="Gió"
android:id="@+id/textviewWind"/>

</LinearLayout>

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:text="Ngày cập nhật"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:textColor="@color/black"
android:id="@+id/textviewDay"/>

<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Các ngày tiếp theo"
android:layout_marginTop="30dp"
android:textSize="25dp"
android:textColor="@color/black"
android:id="@+id/buttonChangeActivity"/>

</LinearLayout>

You might also like