<?xml version="1.0" encoding="utf-8"?><!--
  ~ DSBDirect
  ~ Copyright (C) 2019 Fynn Godau
  ~
  ~ 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 <https://www.gnu.org/licenses/>.
  ~
  ~ This software is not affiliated with heinekingmedia GmbH, the
  ~ developer of the DSB platform.
  -->

<RelativeLayout 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="godau.fynn.dsbdirect.activity.MainActivity"
    android:id="@+id/root">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:titleTextColor="@color/titleText" />

    <android.support.design.widget.CoordinatorLayout
        android:id="@+id/contentCoordinator"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_above="@id/page"
        android:layout_below="@id/toolbar">

        <RelativeLayout
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:layout_margin="8dp"
                android:foregroundGravity="center"
                android:text="@string/initializing" />

            <Button
                android:id="@+id/fix"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:layout_margin="8dp"
                android:layout_below="@id/text"
                android:visibility="gone"
                android:text="@string/news_fix" />

            <!-- WebView is created dynamically -->

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/date"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="8dp"
                    android:textSize="16pt"
                    android:textColor="?attr/TextOverBackground"
                    android:visibility="gone" />

                <ListView
                    android:id="@+id/table"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignParentBottom="true"
                    android:layout_alignParentTop="false"
                    android:layout_below="@id/date"
                    android:transcriptMode="disabled"
                    android:listSelector="@android:color/transparent"
                    android:visibility="gone" />

            </RelativeLayout>

            <com.ortiz.touchview.TouchImageView
                android:id="@+id/tableimage"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentTop="true"
                android:visibility="gone" />

        </RelativeLayout>

    </android.support.design.widget.CoordinatorLayout>

    <com.wefika.horizontalpicker.HorizontalPicker
        android:id="@+id/page"
        android:textSize="14sp"
        android:layout_gravity="bottom"
        android:layout_width="wrap_content"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:visibility="gone"
        android:background="@color/colorPrimary"
        android:textColor="@color/white" />
</RelativeLayout>
