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

<!--
 This file is part of TinyWeatherForecastGermany.

 Copyright (c) 2020, 2021 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/fcitem_supermaincontainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?attr/colorPrimary">

    <View android:id="@+id/fcitem_topPadding"
          android:layout_width="match_parent"
          android:layout_height="@dimen/forcecastadapterPadding"
    />

    <View
            android:id="@+id/fcitem_endofday_bar"
            android:layout_width="match_parent"
            android:layout_height="@dimen/forcecastadapterPadding"
            android:layout_marginTop="@dimen/forcecastadapterPadding"
            android:layout_marginBottom="@dimen/forcecastadapterPadding"
            android:layout_alignParentBottom="true"
            android:visibility="gone"/>

    <View android:id="@+id/fcitem_bottomPadding"
          android:layout_above="@id/fcitem_endofday_bar"
          android:layout_alignWithParentIfMissing="true"
          android:layout_width="match_parent"
          android:layout_height="@dimen/forcecastadapterPadding"
    />

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/fcitem_maincontainer"
                    android:layout_width="match_parent"
                    android:layout_below="@id/fcitem_topPadding"
                    android:layout_above="@id/fcitem_bottomPadding"
                    android:layout_height="150sp"
                    android:padding="3dp"
                    android:background="?attr/colorPrimary">

        <TextView android:id="@+id/fcitem_heading"
                  android:textSize="@dimen/fcmain_textsize_large_fixed"
                  android:textStyle="bold"
                  android:textColor="?attr/colorTextLight"
                  android:layout_gravity="center_horizontal"
                  android:textAlignment="center"
                  android:layout_alignParentTop="true"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"/>

        <ImageView
                android:id="@+id/fcitem_warningsymbol"
                android:layout_width="@dimen/fcmain_textsize_xl"
                android:layout_height="@dimen/fcmain_textsize_xl"
                android:layout_marginLeft="3dp"
                android:layout_toRightOf="@id/fcitem_heading"
                android:visibility="invisible"
                android:src="@mipmap/warning_icon"/>

        <TextView android:id="@+id/fcitem_warningtext"
                  android:textSize="@dimen/fcmain_textsize_medium"
                  android:textColor="?attr/colorTextLight"
                  android:layout_gravity="center_horizontal"
                  android:textAlignment="center"
                  android:layout_below="@id/fcitem_heading"
                  android:singleLine="false"
                  android:visibility="gone"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"/>

        <RelativeLayout
                android:id="@+id/fcitem2_forecastholder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/fcitem_warningtext"
                android:layout_alignWithParentIfMissing="true">

            <RelativeLayout
                    android:id="@+id/fcitem2_temperatureholder"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true">

                <TextView android:id="@+id/fcitem_temperature"
                          android:textSize="@dimen/fcmain_textsize_xxl"
                          android:textColor="?attr/colorTextLight"
                          android:textStyle="bold"
                          android:layout_centerVertical="true"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/>

            </RelativeLayout>

            <LinearLayout
                    android:id="@+id/fcitem_temperature_horizontal_container"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@id/fcitem2_temperatureholder"
                    android:layout_centerVertical="true"
                    android:orientation="vertical"
                    android:gravity="top">

                <TextView android:id="@+id/fcitem_temperature_high"
                          android:textSize="@dimen/fcmain_textsize_xl"
                          android:textStyle="bold"
                          android:textColor="?attr/colorTextLight"
                          android:layout_gravity="top"
                          android:gravity="top"
                          android:layout_marginLeft="5dp"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/>

                <View android:layout_width="@dimen/fcmain_textsize_xl"
                      android:layout_height="1dp"
                      android:layout_gravity="center"
                      android:background="?attr/colorTextLight"/>


                <TextView android:id="@+id/fcitem_temperature_low"
                          android:textSize="@dimen/fcmain_textsize_xl"
                          android:textStyle="bold"
                          android:textColor="?attr/colorTextLight"
                          android:layout_gravity="bottom"
                          android:gravity="bottom"
                          android:layout_marginLeft="5dp"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/>

            </LinearLayout>

            <ImageView android:id="@+id/fcitem_weatherconditionicon"
                       android:layout_width="@dimen/fcmain_fciconsize"
                       android:layout_height="@dimen/fcmain_fciconsize"
                       android:layout_toLeftOf="@id/fcitem2_temperatureholder"
                       android:layout_marginRight="15dp"
                       android:layout_alignParentTop="true"
            />

            <TextView
                    android:id="@+id/fcitem_uvHazardIndex"
                    android:layout_width="21dp"
                    android:layout_height="21dp"
                    android:visibility="gone"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentBottom="true"
                    android:gravity="center"
                    android:text="-1"
                    android:shadowRadius="1"
                    android:shadowDx="1"
                    android:shadowDy="1"
                    android:textSize="@dimen/fcmain_textsize_medium"
                    android:shadowColor="?attr/colorTextLight"
                    android:textColor="?attr/colorText"/>

            <TextView android:id="@+id/fcitem_weatherconditiontext"
                      android:textSize="@dimen/fcmain_narrowdevice_textsize_large"
                      android:textColor="?attr/colorTextLight"
                      android:layout_toRightOf="@id/fcitem_uvHazardIndex"
                      android:layout_alignWithParentIfMissing="true"
                      android:layout_alignParentBottom="true"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"/>

            <TextView android:id="@+id/fcitem_rh"
                      android:textSize="@dimen/fcmain_textsize_large"
                      android:textColor="?attr/colorTextLight"
                      android:layout_gravity="left|bottom"
                      android:gravity="right|bottom"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentRight="true"
                      android:layout_width="wrap_content"
                      android:layout_height="match_parent"/>

            <ImageView
                    android:id="@+id/fcitem_rh_label"
                    android:layout_width="@dimen/fcmain_textsize_large"
                    android:layout_height="@dimen/fcmain_textsize_large"
                    android:layout_toLeftOf="@id/fcitem_rh"
                    android:layout_alignBottom="@id/fcitem_rh"
                    android:src="@mipmap/symbol_rh"/>

            <RelativeLayout
                    android:id="@+id/fcitem2_windholder"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@id/fcitem_temperature_horizontal_container"
                    android:layout_marginLeft="@dimen/fcmain_textsize_medium"
                    android:layout_centerVertical="true">

                <ImageView
                        android:id="@+id/fcitem_windarrow"
                        android:layout_width="@dimen/fcmain_textsize_xl"
                        android:layout_height="@dimen/fcmain_textsize_xl"
                        android:layout_gravity="center">
                </ImageView>

                <TextView android:id="@+id/fcitem_wind"
                          android:textSize="@dimen/fcmain_textsize_medium"
                          android:textColor="?attr/colorTextLight"
                          android:layout_below="@id/fcitem_windarrow"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/>

            </RelativeLayout>

            <RelativeLayout
                    android:id="@+id/fcitem2_otherholder"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@id/fcitem2_windholder"
                    android:layout_centerVertical="true">
            </RelativeLayout>
        </RelativeLayout>

        <LinearLayout
                android:id="@+id/fcitem_rise_textcontainer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:orientation="vertical">

            <TextView android:id="@+id/fcitem_rise1"
                      android:textSize="@dimen/fcmain_textsize_medium"
                      android:textColor="?attr/colorTextLight"
                      android:layout_gravity="right"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"/>

            <TextView android:id="@+id/fcitem_rise2"
                      android:textSize="@dimen/fcmain_textsize_medium"
                      android:textColor="?attr/colorTextLight"
                      android:layout_gravity="right"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"/>
        </LinearLayout>

        <ImageView android:id="@+id/fcitem_sunet1"
                   android:layout_width="@dimen/fcmain_textsize_xl"
                   android:layout_height="@dimen/fcmain_textsize_xl_half"
                   android:layout_toLeftOf="@id/fcitem_rise_textcontainer"
                   android:layout_alignParentTop="true"
                   android:layout_marginTop="2dp"
                   android:src="@mipmap/sunset"/>

        <ImageView android:id="@+id/fcitem_sunet2"
                   android:layout_width="@dimen/fcmain_textsize_xl"
                   android:layout_height="@dimen/fcmain_textsize_xl_half"
                   android:layout_toLeftOf="@id/fcitem_rise_textcontainer"
                   android:layout_below="@id/fcitem_sunet1"
                   android:src="@mipmap/arrow_down"/>

    </RelativeLayout>

</RelativeLayout>

