<?xml version="1.0" encoding="utf-8"?><!--
  ~ Twidere - Twitter client for Android
  ~
  ~  Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
  ~
  ~  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/>.
  -->

<org.mariotaku.twidere.view.ExtendedRelativeLayout
    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:id="@+id/mainContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="@dimen/element_spacing_normal">


    <androidx.cardview.widget.CardView
        android:id="@+id/searchContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        app:cardBackgroundColor="?cardItemBackgroundColor"
        app:cardCornerRadius="2dp"
        app:cardElevation="2dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:showDividers="middle">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/element_size_normal"
                android:orientation="horizontal">

                <androidx.appcompat.widget.AppCompatSpinner
                    android:id="@+id/accountSpinner"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_weight="0"
                    tools:listitem="@layout/spinner_item_account_icon"/>

                <org.mariotaku.twidere.view.FixedEditText
                    android:id="@+id/searchQuery"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@android:color/transparent"
                    android:focusable="true"
                    android:hint="@string/search_hint"
                    android:imeOptions="actionSearch"
                    android:inputType="text|textImeMultiLine"
                    android:maxLines="1">

                    <requestFocus/>
                </org.mariotaku.twidere.view.FixedEditText>

                <org.mariotaku.twidere.view.IconActionButton
                    android:id="@+id/searchSubmit"
                    android:layout_width="@dimen/element_size_normal"
                    android:layout_height="match_parent"
                    android:layout_weight="0"
                    android:background="?actionBarItemBackground"
                    android:color="?menuIconColor"
                    android:src="@drawable/ic_action_search"
                    tools:tint="?menuIconColor"/>

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="2dp"
                android:background="#20808080"/>

            <ListView
                android:id="@+id/suggestionsList"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:listSelector="?selectableItemBackground"
                tools:listitem="@layout/list_item_suggestion_search"/>
        </LinearLayout>

    </androidx.cardview.widget.CardView>

    <!-- Make sure ad won't overlap search box -->
    <FrameLayout
        android:id="@+id/adContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_below="@+id/searchContainer"/>

</org.mariotaku.twidere.view.ExtendedRelativeLayout>