<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="8dip"
    android:animateLayoutChanges="true"
    >
    <LinearLayout
        android:id="@+id/header1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        >
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
        >
            <AutoCompleteTextView
                android:id="@+id/commandline"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:hint="dumpsys [SERVICE], logcat -b crash, etc"
                android:text=""
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
            />
            <Button
                style="@style/OneCharButton"
                android:id="@+id/multi_picker"
                android:layout_height="wrap_content"
                android:text="🔍"
            />
        </LinearLayout>
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >
            <TextView
                android:id="@+id/grep_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="grep"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text=" -B"
            />
            <AutoCompleteTextView
                android:id="@+id/beforeContext"
                android:layout_width="32sp"
                android:layout_height="wrap_content"
                android:dropDownWidth="64sp"
                android:text="0"
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
            />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="-A"
                />
            <AutoCompleteTextView
                android:id="@+id/afterContext"
                android:layout_width="32sp"
                android:layout_height="wrap_content"
                android:dropDownWidth="64sp"
                android:text="0"
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="-i"
                />
            <CheckBox
                android:id="@+id/ignore_case"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
            <AutoCompleteTextView
                android:id="@+id/pattern"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:dropDownWidth="320sp"
                android:hint="regexp"
                android:text=""
                android:layout_weight="1"
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
                />
            <Button
                style="@style/OneCharButton"
                android:id="@+id/re_picker"
                android:layout_height="wrap_content"
                android:text="…"
            />
        </LinearLayout>
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="head"
                />
            <AutoCompleteTextView
                android:id="@+id/head"
                android:layout_width="64sp"
                android:layout_height="wrap_content"
                android:text="0"
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="tail"
                />
            <AutoCompleteTextView
                android:id="@+id/tail"
                android:layout_width="64sp"
                android:layout_height="wrap_content"
                android:text="0"
                android:inputType="text"
                android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
                android:maxLines="1"
                android:scrollHorizontally="true"
                android:selectAllOnFocus="true"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="to last"
                />
            <CheckBox
                android:id="@+id/scroll_to_bottm"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
            <Button
                android:id="@+id/start"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Go"
                android:layout_weight="1"
                />
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Search"
            />
        <AutoCompleteTextView
            android:id="@+id/search"
            android:layout_width="64sp"
            android:layout_height="wrap_content"
            android:dropDownWidth="320sp"
            android:text=""
            android:layout_weight="1"
            android:inputType="text"
            android:imeOptions="flagForceAscii|actionGo|flagNoPersonalizedLearning|flagNoFullscreen"
            android:maxLines="1"
            android:scrollHorizontally="true"
            android:selectAllOnFocus="true"
            />
        <Button
            style="@style/OneCharButton"
            android:id="@+id/find_next"
            android:layout_height="wrap_content"
            android:text="∨"
            />
        <Button
            style="@style/OneCharButton"
            android:id="@+id/find_prev"
            android:layout_height="wrap_content"
            android:text="∧"
            />
        <Button
            style="@style/OneCharButton"
            android:id="@+id/close_header"
            android:layout_height="wrap_content"
            android:textStyle="bold"
            android:text="⇧"
        />
        <Button
            style="@style/OneCharButton"
            android:id="@+id/open_header"
            android:layout_height="wrap_content"
            android:textStyle="bold"
            android:text="⇩"
        />
    </LinearLayout>
    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        />
</LinearLayout>
