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

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/geoinput_scrollview"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimaryLight"
        android:padding="3dp">

        <TextView
                android:id="@+id/geoinput_known_note"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="?attr/colorAccent"
                android:textSize="@dimen/geo_textsize_medium"
                android:layout_alignParentTop="true"
                android:layout_alignParentLeft="true"
                android:layout_marginBottom="6dp"
                android:visibility="gone"
                android:text="@string/geoinput_known_note"/>


        <LinearLayout
            android:id="@+id/geoinput_globeholder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/geoinput_known_note"
            android:weightSum="5"
            android:orientation="horizontal">

            <LinearLayout
                android:id="@+id/geoinput_globeholder_left"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/geoinput_text_latitude"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="?attr/colorText"
                    android:textSize="@dimen/geo_textsize_large"
                    android:layout_below="@id/geoinput_known_note"
                    android:text="@string/geoinput_latitude"/>

                <EditText
                    android:id="@+id/geoinput_edit_latitude"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/geoinput_text_latitude"
                    android:textColor="?attr/colorText"
                    android:textSize="@dimen/geo_textsize_large"
                    android:hint="@string/geoinput_hint_latitude"
                    android:inputType="text"/>

                <TextView
                    android:id="@+id/geoinput_text_longitude"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="?attr/colorText"
                    android:textSize="@dimen/geo_textsize_large"
                    android:layout_below="@id/geoinput_edit_latitude"
                    android:text="@string/geoinput_longitude"/>

                <EditText
                    android:id="@+id/geoinput_edit_longitude"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/geoinput_text_longitude"
                    android:textColor="?attr/colorText"
                    android:textSize="@dimen/geo_textsize_large"
                    android:hint="@string/geoinput_hint_longitude"
                    android:inputType="text"/>


            </LinearLayout>


            <ImageView
                android:id="@+id/geoinput_globe"
                android:layout_width="0dp"
                android:layout_height="80dp"
                android:layout_weight="1"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:layout_gravity="center_vertical|right"
                android:gravity="center_vertical|right"
                android:src="@drawable/geo_globe"/>

        </LinearLayout>

        <TextView
            android:id="@+id/geoinput_text_into"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="?attr/colorText"
            android:textSize="@dimen/geo_textsize_large"
            android:layout_marginBottom="12dp"
            android:layout_below="@id/geoinput_globeholder"
            android:text="@string/geoinput_intro"/>

        <CheckBox
            android:id="@+id/geoinput_check_gps"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/geoinput_text_into"
            android:layout_alignParentLeft="true"
            android:textColor="?attr/colorText"
            android:textSize="@dimen/fcmain_textsize_large"
            android:checked="false"/>

        <TextView
                android:id="@+id/geoinput_text_gps"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="?attr/colorText"
                android:textSize="@dimen/geo_textsize_large"
                android:layout_toRightOf="@id/geoinput_check_gps"
                android:layout_below="@id/geoinput_text_into"
                android:text="@string/geoinput_gps"/>

    </RelativeLayout>
</ScrollView>