summaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-09-28 20:04:04 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-09-28 20:04:04 +0200
commitc7e46108de55f1797e96d33cf0b805c380051d13 (patch)
tree2b50bb4e712989c790ab252e16ed662817f05bdc /app/src/main/res/layout
downloadkanakaeiwa-c7e46108de55f1797e96d33cf0b805c380051d13.tar.gz
kanakaeiwa-c7e46108de55f1797e96d33cf0b805c380051d13.tar.zst
kanakaeiwa-c7e46108de55f1797e96d33cf0b805c380051d13.zip
Initial commit, screen 1
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_main.xml25
-rw-r--r--app/src/main/res/layout/content_main.xml19
-rw-r--r--app/src/main/res/layout/fragment_first.xml139
-rw-r--r--app/src/main/res/layout/fragment_second.xml155
4 files changed, 338 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..507729b
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
+ tools:context=".MainActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="@style/Theme.Kanakaʻeiwa.AppBarOverlay">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ android:background="?attr/colorPrimary"
+ app:popupTheme="@style/Theme.Kanakaʻeiwa.PopupOverlay" />
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <include layout="@layout/content_main" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
new file mode 100644
index 0000000..e416e1c
--- /dev/null
+++ b/app/src/main/res/layout/content_main.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+ <fragment
+ android:id="@+id/nav_host_fragment_content_main"
+ android:name="androidx.navigation.fragment.NavHostFragment"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:defaultNavHost="true"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:navGraph="@navigation/nav_graph" />
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_first.xml b/app/src/main/res/layout/fragment_first.xml
new file mode 100644
index 0000000..d876bf5
--- /dev/null
+++ b/app/src/main/res/layout/fragment_first.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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"
+ tools:context=".FirstFragment">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/city_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:text="Mountain View, US"
+ android:textAlignment="center"
+ android:textSize="25sp" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="2">
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="2"
+ android:id="@+id/weather_img"
+ android:src="@drawable/ic_baseline_wb_sunny_24" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/temp"
+ android:layout_marginTop="30dp"
+ android:layout_marginBottom="20dp"
+ android:textAlignment="center"
+ android:text="14.03 *C"
+ android:textFontWeight="700"
+ android:textSize="40sp" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAlignment="center"
+ android:id="@+id/weather_text"
+ android:text="overcast clouds"
+ android:textSize="23sp" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:text="Details:"
+ android:textSize="25sp" />
+
+ <GridLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:columnCount="2">
+
+ <TextView
+ android:padding="3dip"
+ android:text="Humidity: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:id="@+id/humidity"
+ android:text="85%"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="Max Temp: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="15.47 *C"
+ android:id="@+id/max_temp"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Min Temp: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="11.29 *C"
+ android:id="@+id/min_temp"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Pressure"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="1013hPa"
+ android:id="@+id/pressure"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Wind speed"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="2.06 km/h"
+ android:id="@+id/wind_speed"
+ android:textSize="23dp" />
+ </GridLayout>
+ </LinearLayout>
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/button_first"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="20dp"
+ android:text="@string/next"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:srcCompat="@drawable/ic_baseline_arrow_forward_24" />
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_second.xml b/app/src/main/res/layout/fragment_second.xml
new file mode 100644
index 0000000..0acfa7f
--- /dev/null
+++ b/app/src/main/res/layout/fragment_second.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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"
+ tools:context=".FirstFragment">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/filledTextField"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="32dp"
+ android:layout_marginTop="32dp"
+ android:layout_marginEnd="32dp"
+ android:hint="Enter something">
+
+ <!--this is the actual edit text which takes the input-->
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/edit_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ </com.google.android.material.textfield.TextInputLayout>
+ <TextView
+ android:id="@+id/city_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:text="Mountain View, US"
+ android:textAlignment="center"
+ android:textSize="25sp" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="2">
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="2"
+ android:id="@+id/weather_img"
+ android:src="@drawable/ic_baseline_wb_sunny_24" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/temp"
+ android:layout_marginTop="30dp"
+ android:layout_marginBottom="20dp"
+ android:textAlignment="center"
+ android:text="14.03 *C"
+ android:textFontWeight="700"
+ android:textSize="40sp" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAlignment="center"
+ android:id="@+id/weather_text"
+ android:text="overcast clouds"
+ android:textSize="23sp" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:text="Details:"
+ android:textSize="25sp" />
+
+ <GridLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:columnCount="2">
+
+ <TextView
+ android:padding="3dip"
+ android:text="Humidity: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:id="@+id/humidity"
+ android:text="85%"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="Max Temp: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="15.47 *C"
+ android:id="@+id/max_temp"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Min Temp: "
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="11.29 *C"
+ android:id="@+id/min_temp"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Pressure"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="1013hPa"
+ android:id="@+id/pressure"
+ android:textSize="23dp" />
+ <TextView
+ android:padding="3dip"
+ android:text="Wind speed"
+ android:textSize="23dp" />
+
+ <TextView
+ android:padding="3dip"
+ android:text="2.06 km/h"
+ android:id="@+id/wind_speed"
+ android:textSize="23dp" />
+ </GridLayout>
+ </LinearLayout>
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/button_first"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="20dp"
+ android:text="@string/next"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:srcCompat="@drawable/ic_baseline_arrow_forward_24" />
+</androidx.constraintlayout.widget.ConstraintLayout>