<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:weightSum="1">

        <Button
            android:id="@+id/discovery_start"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:text="@string/discovery_start_scanning" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Bluetooth scan:" />

            <ProgressBar
                android:id="@+id/discovery_progressbar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:indeterminate="true"
                android:indeterminateOnly="true"
                android:visibility="gone" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Bluetooth LE scan:" />

            <ProgressBar
                android:id="@+id/discovery_ble_progressbar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:indeterminate="true"
                android:indeterminateOnly="true"
                android:visibility="gone" />
        </LinearLayout>


        <ListView
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:id="@+id/discovery_device_candidates_list"
            android:layout_gravity="bottom|top"
            android:layout_weight="0.83" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:text="@string/discovery_note"
            android:id="@+id/discovery_note"
            android:textStyle="bold"
            android:textColor="@color/secondarytext"
            android:gravity="center_horizontal|bottom" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:text="@string/discovery_connected_devices_hint"
            android:id="@+id/discovery_hint"
            android:textColor="@color/secondarytext"
            android:textIsSelectable="true" />

    </LinearLayout>
</LinearLayout>
