Skip to content
Snippets Groups Projects
Commit b1c245df authored by gsun's avatar gsun
Browse files

Layout done
parent f9e6d91f
No related branches found
No related tags found
1 merge request!1Luke
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<stroke android:color="@android:color/black"
android:width="1dp"/>
</shape>
</item>
<item
android:left="1dp"
android:right="1dp"
android:bottom="1dp"
android:top="1dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<stroke android:color="@android:color/black"
android:width="1dp"/>
</shape>
</item>
<item android:right="1dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout 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:gravity="center_horizontal"
android:background="@android:color/white"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".MainActivity"
tools:showIn="@layout/activity_main">
<TextView
<LinearLayout
android:id="@+id/weather_panel"
android:layout_width="wrap_content"
android:visibility="visible"
android:layout_height="wrap_content"
android:text="Hello World!"
android:id="@+id/text0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
android:orientation="vertical">
<TextView
android:id="@+id/tex_city_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:textSize="24sp"
android:textStyle="bold"
android:text="Fetching City Name..."/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/img_weather"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/ic_launcher"/>
<TextView
android:id="@+id/text0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:layout_marginLeft="8dp"
android:textSize="50sp"
android:textStyle="bold"
android:text="14 C"/>
</LinearLayout>
<TextView
android:id="@+id/txt_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:layout_marginLeft="8dp"
android:textSize="18sp"
android:textStyle="bold"
android:text="Fetching Description"/>
<TextView
android:id="@+id/txt_date_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:layout_marginLeft="8dp"
android:textSize="18sp"
android:textStyle="bold"
android:text="Fetching Date Time"/>
<TableLayout
android:background="@drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:stretchColumns="*"
android:padding="16dp">
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Wind"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txt_wind"
android:text="Speed:1 Deg: 1"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Pressure"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txt_pressure"
android:text="1013.75 hpa"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Humidity"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txt_humidity"
android:text="100%"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Sunrise"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txt_sunrise"
android:text="11:00"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Sunset"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txt_sunset"
android:text="18:00"
android:background="@drawable/cell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"/>
</TableRow>
</TableLayout>
</LinearLayout>
<!-- <ProgressBar-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:id="@+id/loading"-->
<!-- android:indeterminate="true"-->
<!-- android:layout_centerInParent="true"/>-->
</RelativeLayout>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment