2020-10-09 10:19:46 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?><!--
|
|
|
|
Copyright 2020 Thomas Schneider
|
|
|
|
|
|
|
|
This file is a part of TubeLab
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
TubeLab 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 TubeLab; if not,
|
|
|
|
see <http://www.gnu.org/licenses>.
|
|
|
|
-->
|
2020-10-09 18:22:05 +02:00
|
|
|
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
xmlns:TagsEditText="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2020-10-09 10:19:46 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2020-10-09 18:22:05 +02:00
|
|
|
android:fitsSystemWindows="true"
|
|
|
|
tools:context=".SepiaSearchActivity">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
2020-10-09 10:19:46 +02:00
|
|
|
android:layout_width="match_parent"
|
2020-10-09 18:22:05 +02:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:fitsSystemWindows="true"
|
2020-11-17 18:49:43 +01:00
|
|
|
app:theme="@style/popupTheme">
|
|
|
|
|
2020-10-09 18:22:05 +02:00
|
|
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:fitsSystemWindows="true"
|
|
|
|
app:contentScrim="?attr/colorPrimary"
|
|
|
|
app:expandedTitleMarginEnd="64dp"
|
|
|
|
app:expandedTitleMarginStart="48dp"
|
2020-11-17 18:49:43 +01:00
|
|
|
android:background="?android:colorBackground"
|
2020-10-09 18:22:05 +02:00
|
|
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
2020-11-17 18:49:43 +01:00
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2020-10-09 18:22:05 +02:00
|
|
|
android:layout_marginStart="@dimen/fab_margin"
|
|
|
|
android:layout_marginEnd="@dimen/fab_margin"
|
2020-10-09 10:19:46 +02:00
|
|
|
android:layout_width="match_parent"
|
2020-10-09 18:22:05 +02:00
|
|
|
android:layout_height="wrap_content">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2020-10-09 10:19:46 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2020-10-09 18:22:05 +02:00
|
|
|
android:id="@+id/header"
|
2020-10-09 10:19:46 +02:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-10-09 18:22:05 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent">
|
|
|
|
<com.mancj.materialsearchbar.MaterialSearchBar
|
2020-11-17 18:49:43 +01:00
|
|
|
style="@style/searchBarSepia"
|
2020-10-09 18:22:05 +02:00
|
|
|
app:mt_speechMode="false"
|
2020-11-22 16:46:05 +01:00
|
|
|
app:mt_backIconTint="?attr/colorAccent"
|
|
|
|
app:mt_clearIconTint="?attr/colorAccent"
|
|
|
|
app:mt_menuIconTint="?attr/colorAccent"
|
|
|
|
app:mt_searchIconTint="?attr/colorAccent"
|
2020-10-09 18:22:05 +02:00
|
|
|
app:mt_hint="@string/sepia_search_hint"
|
|
|
|
app:mt_maxSuggestionsCount="10"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:animateLayoutChanges="false"
|
|
|
|
android:id="@+id/searchBar" />
|
|
|
|
<TextView
|
|
|
|
android:layout_marginTop="5dp"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/searchBar"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/colorAccent"
|
|
|
|
android:id="@+id/explanations"
|
|
|
|
android:text="@string/sepia_indication"
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
android:id="@+id/filter"
|
|
|
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/filter"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
|
|
|
android:drawableEnd="@drawable/ic_baseline_arrow_drop_down_24"
|
|
|
|
/>
|
2020-10-09 10:19:46 +02:00
|
|
|
|
2020-10-09 18:22:05 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/sort_by"
|
|
|
|
android:text="@string/sort_by"
|
|
|
|
android:labelFor="@+id/sort_by"/>
|
|
|
|
<Spinner
|
|
|
|
android:id="@+id/sort_by"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
|
|
|
/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2020-10-09 10:19:46 +02:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/filter_elements"
|
2020-10-09 14:54:01 +02:00
|
|
|
android:visibility="gone"
|
|
|
|
android:animateLayoutChanges="true"
|
2020-10-09 18:22:05 +02:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/header"
|
2020-10-09 10:19:46 +02:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent">
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_nsfw"
|
|
|
|
android:text="@string/sepia_element_nsfw"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
android:id="@+id/sepia_element_nsfw_label"
|
|
|
|
/>
|
|
|
|
<RadioGroup
|
|
|
|
android:id="@+id/sepia_element_nsfw"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="0dp"
|
|
|
|
android:paddingTop="5dp"
|
|
|
|
android:paddingBottom="5dp"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw_label"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_nsfw_yes"
|
|
|
|
android:text="@string/yes"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_nsfw_no"
|
|
|
|
android:text="@string/no"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
</RadioGroup>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_published_date"
|
|
|
|
android:text="@string/sepia_element_published_date"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
android:id="@+id/sepia_element_published_date_label"
|
|
|
|
/>
|
|
|
|
<HorizontalScrollView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:id="@+id/sepia_element_published_date"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingTop="5dp"
|
|
|
|
android:paddingBottom="5dp"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date_label"
|
|
|
|
app:layout_constraintStart_toStartOf="parent">
|
|
|
|
<RadioGroup
|
2020-10-09 14:54:01 +02:00
|
|
|
android:id="@+id/radio_date"
|
2020-10-09 10:19:46 +02:00
|
|
|
android:orientation="horizontal"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_published_date_any"
|
|
|
|
android:text="@string/any"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_published_date_today"
|
|
|
|
android:text="@string/today"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_published_date_last_7_days"
|
|
|
|
android:text="@string/last_7_days"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_published_date_last_30_days"
|
|
|
|
android:text="@string/last_30_days"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_published_date_last_365_days"
|
|
|
|
android:text="@string/last_365_days"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
</RadioGroup>
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_duration"
|
|
|
|
android:text="@string/sepia_element_duration"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
android:id="@+id/sepia_element_duration_label"
|
|
|
|
/>
|
|
|
|
<HorizontalScrollView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:id="@+id/sepia_element_duration"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingTop="5dp"
|
|
|
|
android:paddingBottom="5dp"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration_label"
|
|
|
|
app:layout_constraintStart_toStartOf="parent">
|
|
|
|
<RadioGroup
|
2020-10-09 14:54:01 +02:00
|
|
|
android:id="@+id/duration"
|
2020-10-09 10:19:46 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_duration_any"
|
|
|
|
android:text="@string/any"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_duration_short"
|
|
|
|
android:text="@string/duration_short"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_duration_medium"
|
|
|
|
android:text="@string/duration_medium"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/sepia_element_duration_long"
|
|
|
|
android:text="@string/duration_long"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"/>
|
|
|
|
</RadioGroup>
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_category"
|
|
|
|
android:text="@string/category"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
android:id="@+id/sepia_element_category_label"
|
|
|
|
/>
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category_label"
|
|
|
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_category_label"
|
|
|
|
android:id="@+id/sepia_element_category"
|
|
|
|
/>
|
2020-10-09 14:54:01 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_license"
|
|
|
|
android:text="@string/license"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category"
|
|
|
|
android:id="@+id/sepia_element_license_label"
|
|
|
|
/>
|
2020-10-09 10:19:46 +02:00
|
|
|
<Spinner
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/category"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_license_label"
|
|
|
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_license_label"
|
|
|
|
android:id="@+id/sepia_element_license"
|
|
|
|
/>
|
2020-10-09 14:54:01 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_language"
|
|
|
|
android:text="@string/language"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_license"
|
|
|
|
android:id="@+id/sepia_element_language_label"
|
|
|
|
/>
|
|
|
|
|
2020-10-09 10:19:46 +02:00
|
|
|
<Spinner
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/category"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_language_label"
|
|
|
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_language_label"
|
|
|
|
android:id="@+id/sepia_element_language"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_all_of_tags"
|
|
|
|
android:text="@string/all_of_these_tags"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-10-09 14:54:01 +02:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_language"
|
2020-10-09 10:19:46 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:id="@+id/sepia_element_all_of_tags_label"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<mabbas007.tagsedittext.TagsEditText
|
|
|
|
android:id="@+id/sepia_element_all_of_tags"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags_label"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:inputType="textMultiLine"
|
|
|
|
android:lines="2"
|
|
|
|
android:minLines="2"
|
|
|
|
TagsEditText:allowSpaceInTag="true"
|
|
|
|
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
|
|
|
|
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
|
|
|
|
TagsEditText:tagsTextColor="?colorAccent"
|
|
|
|
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
|
|
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:labelFor="@+id/sepia_element_one_of_tags"
|
|
|
|
android:text="@string/one_of_these_tags"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:id="@+id/sepia_element_one_of_tags_label"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<mabbas007.tagsedittext.TagsEditText
|
|
|
|
android:id="@+id/sepia_element_one_of_tags"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags_label"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:inputType="textMultiLine"
|
|
|
|
android:lines="2"
|
|
|
|
android:minLines="2"
|
|
|
|
TagsEditText:allowSpaceInTag="true"
|
|
|
|
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
|
|
|
|
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
|
|
|
|
TagsEditText:tagsTextColor="?colorAccent"
|
|
|
|
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:id="@+id/apply_filter"
|
|
|
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/apply_filter"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags"
|
|
|
|
/>
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2020-10-09 18:22:05 +02:00
|
|
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
2020-10-09 10:19:46 +02:00
|
|
|
|
2020-10-09 18:22:05 +02:00
|
|
|
<FrameLayout
|
|
|
|
android:layout_marginStart="@dimen/fab_margin"
|
|
|
|
android:layout_marginEnd="@dimen/fab_margin"
|
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
|
|
android:id="@+id/container"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
/>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|