<?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/>.
-->

<!--
    View height details:
                                                small           320dp            400dp
    heading: textsize_large                     14sp            16sp             18sp
    forecast text: textsize_medium (2 rows)     20sp            22sp             24sp
    3x icon line:
       12 dp size OR textsize_medium (1 row)    30sp OR 36dp    33sp OR 36dp     36sp OR 36dp
    forecast bar: 21dp
    next day bar: 3dp
-->

<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
            android:id="@+id/fcitem_maincontainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/fcitem_topPadding"
            android:layout_above="@id/fcitem_bottomPadding"
            android:minHeight="324sp"
            android:padding="3dp"
            android:background="?attr/colorPrimary">

        <View android:id="@+id/fcitem_topspace"
              android:layout_width="0dp"
              android:layout_height="26sp"
        />

        <TextView android:id="@+id/fcitem_heading"
                  android:textSize="@dimen/fcmain_mediumdevice_textsize_large_fixed"
                  android:textColor="?attr/colorText"
                  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_mediumdevice_textsize_xl"
                android:layout_height="@dimen/fcmain_mediumdevice_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_mediumdevice_textsize_medium"
                  android:textColor="?attr/colorText"
                  android:layout_gravity="center_horizontal"
                  android:textAlignment="center"
                  android:layout_below="@id/fcitem_topspace"
                  android:singleLine="false"
                  android:visibility="gone"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"/>

        <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_mediumdevice_textsize_medium"
                      android:textColor="?attr/colorText"
                      android:layout_gravity="right"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"/>

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

        <ImageView android:id="@+id/fcitem_sunet1"
                   android:layout_width="24dp"
                   android:layout_height="12dp"
                   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="24dp"
                   android:layout_height="12dp"
                   android:layout_toLeftOf="@id/fcitem_rise_textcontainer"
                   android:layout_below="@id/fcitem_sunet1"
                   android:src="@mipmap/arrow_down"/>

            <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_mediumdevice_textsize_medium"
                    android:shadowColor="?attr/colorTextLight"
                    android:textColor="?attr/colorText"/>

        <ImageView android:id="@+id/fcitem_forecastbar"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:minHeight="21dp"
                   android:layout_toRightOf="@id/fcitem_uvHazardIndex"
                   android:layout_alignWithParentIfMissing="true"
                   android:layout_alignParentBottom="true"/>

        <LinearLayout
                android:id="@+id/fcitem_linearlayout"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@id/fcitem_forecastbar"
                android:layout_below="@id/fcitem_warningtext"
                android:weightSum="3"
                android:gravity="center">

            <LinearLayout android:id="@+id/fcitem_leftcontainer"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:gravity="center"
                          android:orientation="vertical">

                <TextView android:id="@+id/fcitem_weatherconditiontext"
                          android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                          android:textColor="?attr/colorText"
                          android:layout_gravity="center"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"/>

                <RelativeLayout
                        android:id="@+id/fcitem_iconbar1"
                        android:layout_gravity="left"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                    <ImageView android:id="@+id/fcitem_precipitation_symbol"
                               android:layout_width="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_alignParentLeft="true"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_precipitation" />

                    <TextView android:id="@+id/fcitem_precipitation_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_toRightOf="@id/fcitem_precipitation_symbol"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginRight="2dp"
                              android:text="-"/>

                    <TextView android:id="@+id/fcitem_precipitation_unit_upper"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_small"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_toRightOf="@id/fcitem_precipitation_text"
                              android:layout_alignTop="@id/fcitem_precipitation_text"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:text="kg/"/>

                    <TextView android:id="@+id/fcitem_precipitation_unit_lower"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_small"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_toRightOf="@id/fcitem_precipitation_text"
                              android:layout_alignBottom="@id/fcitem_precipitation_text"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:text="m²"/>

                    <ImageView android:id="@+id/fcitem_sunduration_symbol"
                               android:layout_width="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_gravity="left"
                               android:layout_marginRight="2dp"
                               android:layout_marginLeft="2dp"
                               android:layout_toRightOf="@id/fcitem_precipitation_unit_lower"
                               android:src="?attr/symbol_sun" />

                    <TextView android:id="@+id/fcitem_sunduration_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_toRightOf="@id/fcitem_sunduration_symbol"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginRight="2dp"
                              android:text=""/>

                    <TextView android:id="@+id/fcitem_sunduration_unit"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_small"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_toRightOf="@id/fcitem_sunduration_text"
                              android:layout_alignBottom="@id/fcitem_sunduration_text"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginRight="2dp"
                              android:text=""/>


                </RelativeLayout>

                <LinearLayout
                        android:id="@+id/fcitem_iconbar2"
                        android:orientation="horizontal"
                        android:weightSum="12"
                        android:layout_gravity="left"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                    <ImageView android:id="@+id/fcitem_var1_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_cloud" />

                    <TextView android:id="@+id/fcitem_var1_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="12%"/>

                    <ImageView android:id="@+id/fcitem_var2_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_lightning" />

                    <TextView android:id="@+id/fcitem_var2_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="0%"/>

                    <ImageView android:id="@+id/fcitem_var3_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_hail" />

                    <TextView android:id="@+id/fcitem_var3_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="0%"/>

                </LinearLayout>

                <LinearLayout
                        android:id="@+id/fcitem_iconbar3"
                        android:orientation="horizontal"
                        android:weightSum="12"
                        android:layout_gravity="left"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                    <ImageView android:id="@+id/fcitem_var4_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_freezing_rain" />

                    <TextView android:id="@+id/fcitem_var4_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="12%"/>

                    <ImageView android:id="@+id/fcitem_var5_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_fog" />

                    <TextView android:id="@+id/fcitem_var5_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="0%"/>

                    <ImageView android:id="@+id/fcitem_var6_symbol"
                               android:layout_width="0dp"
                               android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                               android:layout_weight="1"
                               android:layout_gravity="left|center_vertical"
                               android:src="@mipmap/symbol_drizzle" />

                    <TextView android:id="@+id/fcitem_var6_text"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left"
                              android:layout_weight="3"
                              android:layout_width="0dp"
                              android:lines="1"
                              android:layout_height="wrap_content"
                              android:text="0%"/>

                </LinearLayout>

            </LinearLayout>

            <LinearLayout android:id="@+id/fcitem_centercontainer"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:gravity="center"
                          android:orientation="vertical">

                <ImageView android:id="@+id/fcitem_weatherconditionicon"
                           android:layout_width="match_parent"
                           android:layout_height="wrap_content"
                           android:layout_gravity="center"/>
            </LinearLayout>

            <LinearLayout android:id="@+id/fcitem_rightcontainer"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:gravity="center"
                          android:orientation="vertical">

                <RelativeLayout
                        android:id="@+id/fcitem_temperature_horizontal_container"
                        android:layout_width="match_parent"
                        android:layout_height="28sp"
                        android:gravity="top"
                        android:orientation="horizontal">

                    <TextView android:id="@+id/fcitem_temperature"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_large"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left|center_vertical"
                              android:gravity="left|center_vertical"
                              android:layout_alignParentLeft="true"
                              android:layout_marginLeft="3dp"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"/>

                    <TextView android:id="@+id/fcitem_temperature_high"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="top"
                              android:gravity="top"
                              android:layout_marginLeft="5dp"
                              android:layout_alignParentTop="true"
                              android:layout_toRightOf="@id/fcitem_temperature"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"/>

                    <View android:id="@+id/fcitem_temperature_bar"
                          android:layout_height="1dp"
                          android:layout_width="18dp"
                          android:layout_toRightOf="@id/fcitem_temperature"
                          android:layout_marginTop="13sp"
                          android:layout_marginLeft="2dp"
                          android:layout_gravity="center"
                          android:gravity="center"
                          android:background="?attr/colorTextLight"/>

                    <TextView android:id="@+id/fcitem_temperature_low"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="bottom"
                              android:gravity="bottom"
                              android:layout_marginLeft="5dp"
                              android:layout_alignParentBottom="true"
                              android:layout_toRightOf="@id/fcitem_temperature"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"/>

                    <TextView android:id="@+id/fcitem_pressure"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="left|top"
                              android:gravity="left|top"
                              android:layout_alignParentTop="true"
                              android:layout_marginLeft="10dp"
                              android:maxLines="1"
                              android:layout_toRightOf="@id/fcitem_temperature_bar"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"/>

                    <TextView android:id="@+id/fcitem_pressure_unit"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_small"
                              android:textColor="?attr/colorText"
                              android:layout_toRightOf="@id/fcitem_pressure"
                              android:layout_alignBottom="@id/fcitem_pressure"
                              android:layout_marginLeft="1dp"
                              android:text="hPa"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"/>

                    <ImageView
                            android:id="@+id/fcitem_rh_label"
                            android:layout_width="@dimen/fcmain_mediumdevice_textsize_medium"
                            android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                            android:layout_alignLeft="@id/fcitem_pressure"
                            android:layout_below="@id/fcitem_pressure"
                            android:src="@mipmap/symbol_rh"/>

                    <TextView android:id="@+id/fcitem_rh"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorTextLight"
                              android:layout_gravity="left|bottom"
                              android:gravity="left|bottom"
                              android:layout_toRightOf="@id/fcitem_rh_label"
                              android:layout_alignBottom="@id/fcitem_rh_label"
                              android:layout_marginLeft="2dp"
                              android:layout_width="wrap_content"
                              android:layout_height="match_parent"/>

                </RelativeLayout>

                <LinearLayout
                        android:id="@+id/fcitem_wind_horizontal_container"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:orientation="horizontal">

                    <ImageView
                            android:id="@+id/fcitem_windarrow"
                            android:layout_width="@dimen/fcmain_mediumdevice_textsize_large"
                            android:layout_height="@dimen/fcmain_mediumdevice_textsize_large"
                            android:layout_marginRight="2dp"
                            android:layout_gravity="center">
                    </ImageView>

                    <TextView android:id="@+id/fcitem_wind"
                              android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                              android:textColor="?attr/colorText"
                              android:layout_gravity="center"
                              android:layout_width="match_parent"
                              android:layout_height="wrap_content"/>
                </LinearLayout>

                <LinearLayout
                        android:id="@+id/fcitem_visibility_container"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:orientation="horizontal">

                    <ImageView
                            android:id="@+id/fcitem_binocular"
                            android:layout_width="@dimen/fcmain_mediumdevice_textsize_medium"
                            android:layout_height="@dimen/fcmain_mediumdevice_textsize_medium"
                            android:layout_gravity="center"
                            android:layout_marginRight="2dp"
                            android:src="?attr/binocular">
                    </ImageView>

                    <TextView
                            android:id="@+id/fcitem_visibility"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:textSize="@dimen/fcmain_mediumdevice_textsize_medium"
                            android:layout_gravity="center"
                            android:textColor="?attr/colorText"/>
                </LinearLayout>

            </LinearLayout>
        </LinearLayout>

        <RelativeLayout
                android:id="@+id/fcitem_popup_hook"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/fcitem_warningsymbol"
                android:gravity="center"/>

    </RelativeLayout>

</RelativeLayout>

