* refactor: use NoResultsException * refactor: cleanup RecommendationPagingSources * refactor: turn wake/wifi lock functions into reusable extensions * feat: implement batch recommendation (initial version) * fix: serialization issues * fix: wrong source id * refactor: increase performance using virtual paging * refactor: update string * refactor: handle 404 of MD source correctly * style: add newline * refactor: create universal throttle manager * refactor: throttle requests * chore: remove unused strings * feat: rank recommendations by match count * feat: add badges indicating match count to batch recommendations * fix: handle rec search with no results * fix: validate flags in pre-search bottom sheet * feat: implement 'hide library entries' for recommendation search using custom SmartSearchEngine for library items * style: run spotless * fix: cancel button * fix: racing condition causing loss of state
117 lines
4.9 KiB
XML
117 lines
4.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout 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:clipToPadding="false"
|
|
android:paddingVertical="8dp"
|
|
android:orientation="vertical">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/rec_options_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@android:color/transparent"
|
|
android:paddingHorizontal="16dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_bias="0.0">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/rec_sources_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/rec_sources_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginVertical="8dp"
|
|
android:text="@string/rec_services_to_search"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorPrimary" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/rec_sources"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:checked="true"
|
|
android:text="@string/rec_group_source" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/rec_trackers"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:checked="true"
|
|
android:text="@string/rec_group_tracker" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/sourceGroup_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginTop="4dp"
|
|
android:background="?android:attr/divider"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/rec_sources_layout"/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/sourceGroup_divider">
|
|
|
|
<TextView
|
|
android:id="@+id/rec_options_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:text="@string/action_settings"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorPrimary"
|
|
app:layout_constraintStart_toStartOf="@+id/rec_sources_layout"
|
|
app:layout_constraintTop_toBottomOf="@+id/migration_data_divider" />
|
|
|
|
|
|
<com.google.android.material.materialswitch.MaterialSwitch
|
|
android:id="@+id/rec_hide_library_entries"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:text="@string/rec_hide_library_entries" />
|
|
</LinearLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<View
|
|
android:id="@+id/rec_search_btn_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginBottom="12dp"
|
|
android:background="?android:attr/divider"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/rec_options_layout" />
|
|
|
|
<Button
|
|
android:id="@+id/rec_search_btn"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginVertical="12dp"
|
|
android:text="@string/rec_search"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/rec_search_btn_divider" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|