<?xml version="1.0" encoding="utf-8"?>

<!--
 This file is part of TinyWeatherForecastGermany.

 Copyright (c) 2020, 2021, 2022, 2023, 2024 Pawel Dube

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<!--

-->

<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/weatherdetails_maincontainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?attr/colorPrimary">

    <TextView android:id="@+id/weatherdetails_reference_text"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:layout_marginRight="2dp"
              android:textColor="?attr/colorText"
              android:textSize="@dimen/widget_textsize_medium"
              android:visibility="visible"
              android:layout_centerHorizontal="true"
              android:text="@string/dwd_notice"/>

    <ScrollView
            android:id="@+id/weatherdetails_scrollview"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_above="@id/weatherdetails_reference_text">

        <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

            <RelativeLayout
                    android:id="@+id/weatherdetails_forecastcontainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="4dp">

                <ImageView android:id="@+id/weatherdetails_backgroundimage"
                           android:layout_width="match_parent"
                           android:layout_height="match_parent"/>

                <RelativeLayout
                        android:id="@+id/weatherdetails_weather_container"
                        android:layout_alignParentTop="true"
                        android:layout_alignParentLeft="true"
                        android:gravity="center_horizontal|center_vertical"
                        android:layout_gravity="center_horizontal|center_vertical"
                        android:layout_marginLeft="@dimen/widget_margin"
                        android:layout_marginRight="@dimen/widget_margin"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                    <ImageView android:id="@+id/weatherdetails_weatherconditionicon"
                               android:layout_width="@dimen/widget_weathericon_size"
                               android:layout_height="@dimen/widget_weathericon_size"
                               android:layout_alignParentLeft="true"
                               android:layout_centerVertical="true"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/not_available" />

                    <TextView android:id="@+id/weatherdetails_temperature"
                              android:textSize="@dimen/widget_textsize_double"
                              android:textColor="@color/colorTextWidget"
                              android:gravity="left|center_vertical"
                              android:layout_centerVertical="true"
                              android:layout_centerHorizontal="true"
                              android:fontFamily="sans-serif-condensed-medium"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginLeft="2dp"
                              android:layout_marginRight="4dp"
                              android:text="-°"/>

                    <RelativeLayout
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_centerVertical="true"
                            android:layout_toRightOf="@id/weatherdetails_temperature">

                        <TextView android:id="@+id/weatherdetails_temperature_highlow"
                                  android:textSize="@dimen/widget_textsize_medium"
                                  android:textColor="?attr/colorText"
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="-° | -°"/>

                        <TextView android:id="@+id/weatherdetails_pressure"
                                  android:textSize="@dimen/widget_textsize_medium"
                                  android:textColor="?attr/colorText"
                                  android:layout_gravity="right"
                                  android:layout_below="@id/weatherdetails_temperature_highlow"
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="- hPa"/>

                    </RelativeLayout>


                    <LinearLayout
                            android:id="@+id/weatherdetails_bottom_text_container"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:layout_alignParentLeft="true"
                            android:layout_below="@id/weatherdetails_weatherconditionicon"
                            android:weightSum="2">

                        <TextView android:id="@+id/weatherdetails_weatherconditiontext"
                                  android:textSize="@dimen/widget_textsize_medium"
                                  android:textColor="?attr/colorText"
                                  android:layout_weight="1"
                                  android:layout_width="0dp"
                                  android:layout_height="wrap_content"
                                  android:layout_marginRight="2dp"
                                  android:textAlignment="textStart"
                                  android:layout_gravity="left"
                                  android:text="-"/>

                        <TextView
                                android:id="@+id/weatherdetails_locationtext"
                                android:textSize="@dimen/widget_textsize_medium"
                                android:textColor="?attr/colorText"
                                android:layout_weight="1"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="2dp"
                                android:textAlignment="textEnd"
                                android:gravity="right"
                                android:text="-"/>

                    </LinearLayout>

                </RelativeLayout>

            </RelativeLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_warnings"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_forecastcontainer"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_clouds"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_warnings"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_wind"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_clouds"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_valuelist"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_wind"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_visibility"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_valuelist"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_incidents"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_visibility"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>


            <LinearLayout
                    android:id="@+id/weatherdetails_precipitation"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_incidents"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <FrameLayout
                    android:id="@+id/weatherdetails_precipitationchartframe"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="3dp"
                    android:layout_below="@id/weatherdetails_precipitation"
                    android:layout_centerInParent="true"
                    android:padding="3dp">

                <ImageView
                        android:id="@+id/weatherdetails_precipitationchart"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:layout_margin="3dp"
                        android:padding="3dp"/>

            </FrameLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_moonandsun"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@id/weatherdetails_precipitationchartframe"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_pollen"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@id/weatherdetails_moonandsun"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>

            <LinearLayout
                    android:id="@+id/weatherdetails_pollenvalues"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_below="@+id/weatherdetails_pollen"
                    android:layout_margin="3dp"
                    android:padding="3dp">
            </LinearLayout>


            <View
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_below="@id/weatherdetails_pollenvalues"
                    />

        </RelativeLayout>

    </ScrollView>

    <ProgressBar
            android:id="@+id/weatherdetails_progressbar"
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:layout_gravity="center"
            android:gravity="center"
            android:indeterminate="true"
            android:visibility="invisible" android:layout_centerInParent="true"/>

</RelativeLayout>