<ScrollView 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="fill_parent"
    android:layout_height="fill_parent">

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:animateLayoutChanges="true"
        android:orientation="vertical"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        tools:context="nodomain.freeyourgadget.gadgetbridge.activities.install.GpxRouteInstallerActivity"
        tools:ignore="ScrollViewSize">

        <ImageView
            android:id="@+id/previewImage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:contentDescription="@string/preview_image" />

        <ListView
            android:id="@+id/itemListView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/previewImage"
            android:layout_alignParentEnd="false" />

        <TextView
            android:id="@+id/infoTextView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/itemListView"
            android:layout_alignParentStart="false"
            android:layout_alignParentTop="false"
            android:layout_alignParentEnd="false"
            android:layout_gravity="center_horizontal" />

        <ImageView
            android:id="@+id/fwappStatusIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/infoTextView"
            android:layout_alignParentStart="false"
            android:layout_alignParentTop="false"
            android:layout_centerHorizontal="true"
            android:contentDescription="@string/status_icon" />

        <ProgressBar
            android:id="@+id/installProgressBar"
            style="@android:style/Widget.DeviceDefault.ProgressBar.Horizontal"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_below="@+id/fwappStatusIcon"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:indeterminate="true"
            android:visibility="gone" />

        <org.mapsforge.map.android.view.MapView
            android:id="@+id/gpx_map_view"
            android:layout_width="match_parent"
            android:layout_height="300dp"
            android:layout_below="@+id/installProgressBar"
            android:orientation="vertical"
            android:paddingTop="8dp" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/track_name_input_layout"
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/gpx_map_view"
            android:layout_marginTop="16dp">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/track_name_edit_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/title_gpx_track_name"
                android:inputType="textNoSuggestions" />
        </com.google.android.material.textfield.TextInputLayout>

        <TextView
            android:id="@+id/installProgressText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/track_name_input_layout"
            android:layout_gravity="start"
            android:visibility="gone" />

        <ListView
            android:id="@+id/detailsListView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/installProgressText"
            android:layout_alignParentEnd="false" />

        <Button
            android:id="@+id/installButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignWithParentIfMissing="false"
            android:layout_below="@+id/detailsListView"
            android:layout_alignParentStart="false"
            android:layout_alignParentTop="false"
            android:layout_alignParentBottom="false"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="10dp"
            android:enabled="false"
            android:text="@string/appinstaller_install" />

        <Button
            android:id="@+id/closeButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignWithParentIfMissing="false"
            android:layout_below="@+id/detailsListView"
            android:layout_alignParentStart="false"
            android:layout_alignParentTop="false"
            android:layout_alignParentBottom="false"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="10dp"
            android:enabled="false"
            android:text="@string/ok"
            android:visibility="gone" />

    </RelativeLayout>

</ScrollView>
