Global search

This commit is contained in:
Koitharu
2020-05-30 11:18:14 +03:00
parent ff56f5a343
commit 3539e6a892
11 changed files with 118 additions and 47 deletions

View File

@@ -9,8 +9,8 @@
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:background="?colorPrimary"
android:fitsSystemWindows="true"
android:theme="@style/AppToolbarTheme">
<androidx.appcompat.widget.Toolbar
@@ -18,7 +18,18 @@
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppPopupTheme" />
app:popupTheme="@style/AppPopupTheme">
<androidx.appcompat.widget.SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:iconifiedByDefault="false"
app:searchHintIcon="@null"
app:searchIcon="@null" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:background="?colorPrimary"
android:theme="@style/AppToolbarTheme">
<androidx.appcompat.widget.Toolbar
android:id="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -5,10 +5,8 @@
<item
android:id="@+id/action_search_internal"
android:icon="@drawable/ic_search"
android:orderInCategory="1"
android:orderInCategory="26"
android:title="@string/search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" />
app:showAsAction="never" />
</menu>

View File

@@ -78,6 +78,7 @@
<string name="read_mode">Режим чтения</string>
<string name="grid_size">Размер таблицы</string>
<string name="search_results_on_s">Результаты поиска по %s</string>
<string name="search_on_s">Поиск по %s</string>
<string name="delete_manga">Удалить мангу</string>
<string name="text_delete_local_manga">Вы уверены, что хотите удалить \"%s\" с устройства? \nЭто действие нельзя будет отменить.</string>
<string name="reader_settings">Настройки чтения</string>

View File

@@ -79,6 +79,7 @@
<string name="read_mode">Read mode</string>
<string name="grid_size">Grid size</string>
<string name="search_results_on_s">Search results on %s</string>
<string name="search_on_s">Search on %s</string>
<string name="delete_manga">Delete manga</string>
<string name="text_delete_local_manga">Do you really want to delete \"%s\" from your phone\'s local storage? \nThis operation cannot be undone.</string>
<string name="reader_settings">Reader settings</string>