apps-android-commons/app/src/main/res/layout/activity_search.xml
2019-03-19 17:54:22 +03:00

90 lines
No EOL
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- Toolbar for viewing media -->
<include layout="@layout/toolbar"
android:visibility="gone" />
<!--Toolbar containing search bar -->
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:navigationIcon="@drawable/ic_arrow_back_white">
<SearchView
android:id="@+id/searchBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
app:theme="@style/WhiteSearchBarTheme"
android:queryBackground="@android:color/transparent"
android:searchIcon="@null"
android:paddingLeft="-16dp"
android:paddingStart="-16dp"
app:queryBackground="@android:color/transparent"
app:searchIcon="@null"
android:imeOptions="actionDone"
android:singleLine="true"
android:iconifiedByDefault="false"
android:textSize="@dimen/normal_text"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
/>
</androidx.appcompat.widget.Toolbar>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/tabBackground"
app:tabIndicatorColor="?attr/tabIndicatorColor"
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
app:tabTextColor="?attr/tabTextColor"
app:tabMode="scrollable"
android:layout_below="@id/toolbar_search"
android:visibility="gone"
/>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mediaContainer"
android:orientation="horizontal"
android:layout_below="@id/toolbar_layout"
/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar_layout"
/>
<FrameLayout
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/searchHistoryContainer"
android:orientation="horizontal"
android:layout_below="@id/toolbar_layout"
/>
</RelativeLayout>
<include layout="@layout/drawer_view" />
</androidx.drawerlayout.widget.DrawerLayout>