feat(filter): revamping search for anime and manga (#272)
* feat: revamping search filter part1 * fix: sortBy dropdown now also calls search instead of only updating image * feat: added longclick listener to reset and apply + cleaned up code * feat: status filter fully functional * chore: upgrade AGP to 8.3.1 * fix: splitted status list and cleaned up * fix(search): underscore * feat: attempt to add backend for countryOfOrigin filter * fix: countryOfOrigin query and gradle * feat: source filter fully functional * fix(source): underscore * feat: swap source with status * fix: add searchSource to reset fun * fix: clear underline after reopening bottom sheet * chore: remove unnecessary declaration * feat: add global to countryOfOrigin dropdown * feat: floating cancel and apply button * fix: added searchStatus and searchYear back to manga filter * feat: desperate attempt for manga year filter * feat(sortBy): added new releases item * fix: year filter --------- Co-authored-by: aayush262 <aayushthakur262006@gmail.com>
This commit is contained in:
parent
aabbe9198a
commit
146805af49
28 changed files with 971 additions and 333 deletions
|
@ -41,20 +41,54 @@ object Anilist {
|
||||||
"SCORE_DESC",
|
"SCORE_DESC",
|
||||||
"POPULARITY_DESC",
|
"POPULARITY_DESC",
|
||||||
"TRENDING_DESC",
|
"TRENDING_DESC",
|
||||||
|
"START_DATE_DESC",
|
||||||
"TITLE_ENGLISH",
|
"TITLE_ENGLISH",
|
||||||
"TITLE_ENGLISH_DESC",
|
"TITLE_ENGLISH_DESC",
|
||||||
"SCORE"
|
"SCORE"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val source = listOf(
|
||||||
|
"ORIGINAL",
|
||||||
|
"MANGA",
|
||||||
|
"LIGHT NOVEL",
|
||||||
|
"VISUAL NOVEL",
|
||||||
|
"VIDEO GAME",
|
||||||
|
"OTHER",
|
||||||
|
"NOVEL",
|
||||||
|
"DOUJINSHI",
|
||||||
|
"ANIME",
|
||||||
|
"WEB NOVEL",
|
||||||
|
"LIVE ACTION",
|
||||||
|
"GAME",
|
||||||
|
"COMIC",
|
||||||
|
"MULTIMEDIA PROJECT",
|
||||||
|
"PICTURE BOOK"
|
||||||
|
)
|
||||||
|
|
||||||
|
val animeStatus = listOf(
|
||||||
|
"FINISHED",
|
||||||
|
"RELEASING",
|
||||||
|
"NOT YET RELEASED",
|
||||||
|
"CANCELLED"
|
||||||
|
)
|
||||||
|
|
||||||
|
val mangaStatus = listOf(
|
||||||
|
"FINISHED",
|
||||||
|
"RELEASING",
|
||||||
|
"NOT YET RELEASED",
|
||||||
|
"HIATUS",
|
||||||
|
"CANCELLED"
|
||||||
|
)
|
||||||
|
|
||||||
val seasons = listOf(
|
val seasons = listOf(
|
||||||
"WINTER", "SPRING", "SUMMER", "FALL"
|
"WINTER", "SPRING", "SUMMER", "FALL"
|
||||||
)
|
)
|
||||||
|
|
||||||
val anime_formats = listOf(
|
val animeFormats = listOf(
|
||||||
"TV", "TV SHORT", "MOVIE", "SPECIAL", "OVA", "ONA", "MUSIC"
|
"TV", "TV SHORT", "MOVIE", "SPECIAL", "OVA", "ONA", "MUSIC"
|
||||||
)
|
)
|
||||||
|
|
||||||
val manga_formats = listOf(
|
val mangaFormats = listOf(
|
||||||
"MANGA", "NOVEL", "ONE SHOT"
|
"MANGA", "NOVEL", "ONE SHOT"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -885,18 +885,22 @@ class AnilistQueries {
|
||||||
sort: String? = null,
|
sort: String? = null,
|
||||||
genres: MutableList<String>? = null,
|
genres: MutableList<String>? = null,
|
||||||
tags: MutableList<String>? = null,
|
tags: MutableList<String>? = null,
|
||||||
|
status: String? = null,
|
||||||
|
source: String? = null,
|
||||||
format: String? = null,
|
format: String? = null,
|
||||||
|
countryOfOrigin: String? = null,
|
||||||
isAdult: Boolean = false,
|
isAdult: Boolean = false,
|
||||||
onList: Boolean? = null,
|
onList: Boolean? = null,
|
||||||
excludedGenres: MutableList<String>? = null,
|
excludedGenres: MutableList<String>? = null,
|
||||||
excludedTags: MutableList<String>? = null,
|
excludedTags: MutableList<String>? = null,
|
||||||
|
startYear: Int? = null,
|
||||||
seasonYear: Int? = null,
|
seasonYear: Int? = null,
|
||||||
season: String? = null,
|
season: String? = null,
|
||||||
id: Int? = null,
|
id: Int? = null,
|
||||||
hd: Boolean = false,
|
hd: Boolean = false,
|
||||||
): SearchResults? {
|
): SearchResults? {
|
||||||
val query = """
|
val query = """
|
||||||
query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult: Boolean = false, ${"$"}search: String, ${"$"}format: [MediaFormat], ${"$"}status: MediaStatus, ${"$"}countryOfOrigin: CountryCode, ${"$"}source: MediaSource, ${"$"}season: MediaSeason, ${"$"}seasonYear: Int, ${"$"}year: String, ${"$"}onList: Boolean, ${"$"}yearLesser: FuzzyDateInt, ${"$"}yearGreater: FuzzyDateInt, ${"$"}episodeLesser: Int, ${"$"}episodeGreater: Int, ${"$"}durationLesser: Int, ${"$"}durationGreater: Int, ${"$"}chapterLesser: Int, ${"$"}chapterGreater: Int, ${"$"}volumeLesser: Int, ${"$"}volumeGreater: Int, ${"$"}licensedBy: [String], ${"$"}isLicensed: Boolean, ${"$"}genres: [String], ${"$"}excludedGenres: [String], ${"$"}tags: [String], ${"$"}excludedTags: [String], ${"$"}minimumTagRank: Int, ${"$"}sort: [MediaSort] = [POPULARITY_DESC, SCORE_DESC]) {
|
query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult: Boolean = false, ${"$"}search: String, ${"$"}format: [MediaFormat], ${"$"}status: MediaStatus, ${"$"}countryOfOrigin: CountryCode, ${"$"}source: MediaSource, ${"$"}season: MediaSeason, ${"$"}seasonYear: Int, ${"$"}year: String, ${"$"}onList: Boolean, ${"$"}yearLesser: FuzzyDateInt, ${"$"}yearGreater: FuzzyDateInt, ${"$"}episodeLesser: Int, ${"$"}episodeGreater: Int, ${"$"}durationLesser: Int, ${"$"}durationGreater: Int, ${"$"}chapterLesser: Int, ${"$"}chapterGreater: Int, ${"$"}volumeLesser: Int, ${"$"}volumeGreater: Int, ${"$"}licensedBy: [String], ${"$"}isLicensed: Boolean, ${"$"}genres: [String], ${"$"}excludedGenres: [String], ${"$"}tags: [String], ${"$"}excludedTags: [String], ${"$"}minimumTagRank: Int, ${"$"}sort: [MediaSort] = [POPULARITY_DESC, SCORE_DESC, START_DATE_DESC]) {
|
||||||
Page(page: ${"$"}page, perPage: ${perPage ?: 50}) {
|
Page(page: ${"$"}page, perPage: ${perPage ?: 50}) {
|
||||||
pageInfo {
|
pageInfo {
|
||||||
total
|
total
|
||||||
|
@ -944,11 +948,15 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
|
||||||
${if (onList != null) ""","onList":$onList""" else ""}
|
${if (onList != null) ""","onList":$onList""" else ""}
|
||||||
${if (page != null) ""","page":"$page"""" else ""}
|
${if (page != null) ""","page":"$page"""" else ""}
|
||||||
${if (id != null) ""","id":"$id"""" else ""}
|
${if (id != null) ""","id":"$id"""" else ""}
|
||||||
${if (seasonYear != null) ""","seasonYear":"$seasonYear"""" else ""}
|
${if (type == "ANIME" && seasonYear != null) ""","seasonYear":"$seasonYear"""" else ""}
|
||||||
|
${if (type == "MANGA" && startYear != null) ""","yearGreater":${startYear}0000,"yearLesser":${startYear + 1}0000""" else ""}
|
||||||
${if (season != null) ""","season":"$season"""" else ""}
|
${if (season != null) ""","season":"$season"""" else ""}
|
||||||
${if (search != null) ""","search":"$search"""" else ""}
|
${if (search != null) ""","search":"$search"""" else ""}
|
||||||
|
${if (source != null) ""","source":"$source"""" else ""}
|
||||||
${if (sort != null) ""","sort":"$sort"""" else ""}
|
${if (sort != null) ""","sort":"$sort"""" else ""}
|
||||||
|
${if (status != null) ""","status":"$status"""" else ""}
|
||||||
${if (format != null) ""","format":"${format.replace(" ", "_")}"""" else ""}
|
${if (format != null) ""","format":"${format.replace(" ", "_")}"""" else ""}
|
||||||
|
${if (countryOfOrigin != null) ""","countryOfOrigin":"$countryOfOrigin"""" else ""}
|
||||||
${if (genres?.isNotEmpty() == true) ""","genres":[${genres.joinToString { "\"$it\"" }}]""" else ""}
|
${if (genres?.isNotEmpty() == true) ""","genres":[${genres.joinToString { "\"$it\"" }}]""" else ""}
|
||||||
${
|
${
|
||||||
if (excludedGenres?.isNotEmpty() == true)
|
if (excludedGenres?.isNotEmpty() == true)
|
||||||
|
@ -980,7 +988,6 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
|
||||||
else ""
|
else ""
|
||||||
}
|
}
|
||||||
}""".replace("\n", " ").replace(""" """, "")
|
}""".replace("\n", " ").replace(""" """, "")
|
||||||
|
|
||||||
val response = executeQuery<Query.Page>(query, variables, true)?.data?.page
|
val response = executeQuery<Query.Page>(query, variables, true)?.data?.page
|
||||||
if (response?.media != null) {
|
if (response?.media != null) {
|
||||||
val responseArray = arrayListOf<Media>()
|
val responseArray = arrayListOf<Media>()
|
||||||
|
@ -1012,7 +1019,11 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
|
||||||
excludedGenres = excludedGenres,
|
excludedGenres = excludedGenres,
|
||||||
tags = tags,
|
tags = tags,
|
||||||
excludedTags = excludedTags,
|
excludedTags = excludedTags,
|
||||||
|
status = status,
|
||||||
|
source = source,
|
||||||
format = format,
|
format = format,
|
||||||
|
countryOfOrigin = countryOfOrigin,
|
||||||
|
startYear = startYear,
|
||||||
seasonYear = seasonYear,
|
seasonYear = seasonYear,
|
||||||
season = season,
|
season = season,
|
||||||
results = responseArray,
|
results = responseArray,
|
||||||
|
|
|
@ -174,7 +174,10 @@ class AnilistAnimeViewModel : ViewModel() {
|
||||||
r.sort,
|
r.sort,
|
||||||
r.genres,
|
r.genres,
|
||||||
r.tags,
|
r.tags,
|
||||||
|
r.status,
|
||||||
|
r.source,
|
||||||
r.format,
|
r.format,
|
||||||
|
r.countryOfOrigin,
|
||||||
r.isAdult,
|
r.isAdult,
|
||||||
r.onList
|
r.onList
|
||||||
)
|
)
|
||||||
|
@ -276,11 +279,15 @@ class AnilistMangaViewModel : ViewModel() {
|
||||||
r.sort,
|
r.sort,
|
||||||
r.genres,
|
r.genres,
|
||||||
r.tags,
|
r.tags,
|
||||||
|
r.status,
|
||||||
|
r.source,
|
||||||
r.format,
|
r.format,
|
||||||
|
r.countryOfOrigin,
|
||||||
r.isAdult,
|
r.isAdult,
|
||||||
r.onList,
|
r.onList,
|
||||||
r.excludedGenres,
|
r.excludedGenres,
|
||||||
r.excludedTags,
|
r.excludedTags,
|
||||||
|
r.startYear,
|
||||||
r.seasonYear,
|
r.seasonYear,
|
||||||
r.season
|
r.season
|
||||||
)
|
)
|
||||||
|
@ -336,11 +343,15 @@ class AnilistSearch : ViewModel() {
|
||||||
r.sort,
|
r.sort,
|
||||||
r.genres,
|
r.genres,
|
||||||
r.tags,
|
r.tags,
|
||||||
|
r.status,
|
||||||
|
r.source,
|
||||||
r.format,
|
r.format,
|
||||||
|
r.countryOfOrigin,
|
||||||
r.isAdult,
|
r.isAdult,
|
||||||
r.onList,
|
r.onList,
|
||||||
r.excludedGenres,
|
r.excludedGenres,
|
||||||
r.excludedTags,
|
r.excludedTags,
|
||||||
|
r.startYear,
|
||||||
r.seasonYear,
|
r.seasonYear,
|
||||||
r.season
|
r.season
|
||||||
)
|
)
|
||||||
|
@ -355,11 +366,15 @@ class AnilistSearch : ViewModel() {
|
||||||
r.sort,
|
r.sort,
|
||||||
r.genres,
|
r.genres,
|
||||||
r.tags,
|
r.tags,
|
||||||
|
r.status,
|
||||||
|
r.source,
|
||||||
r.format,
|
r.format,
|
||||||
|
r.countryOfOrigin,
|
||||||
r.isAdult,
|
r.isAdult,
|
||||||
r.onList,
|
r.onList,
|
||||||
r.excludedGenres,
|
r.excludedGenres,
|
||||||
r.excludedTags,
|
r.excludedTags,
|
||||||
|
r.startYear,
|
||||||
r.seasonYear,
|
r.seasonYear,
|
||||||
r.season
|
r.season
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,13 +11,17 @@ data class SearchResults(
|
||||||
var onList: Boolean? = null,
|
var onList: Boolean? = null,
|
||||||
var perPage: Int? = null,
|
var perPage: Int? = null,
|
||||||
var search: String? = null,
|
var search: String? = null,
|
||||||
|
var countryOfOrigin :String? = null,
|
||||||
var sort: String? = null,
|
var sort: String? = null,
|
||||||
var genres: MutableList<String>? = null,
|
var genres: MutableList<String>? = null,
|
||||||
var excludedGenres: MutableList<String>? = null,
|
var excludedGenres: MutableList<String>? = null,
|
||||||
var tags: MutableList<String>? = null,
|
var tags: MutableList<String>? = null,
|
||||||
var excludedTags: MutableList<String>? = null,
|
var excludedTags: MutableList<String>? = null,
|
||||||
|
var status: String? = null,
|
||||||
|
var source: String? = null,
|
||||||
var format: String? = null,
|
var format: String? = null,
|
||||||
var seasonYear: Int? = null,
|
var seasonYear: Int? = null,
|
||||||
|
var startYear: Int? = null,
|
||||||
var season: String? = null,
|
var season: String? = null,
|
||||||
var page: Int = 1,
|
var page: Int = 1,
|
||||||
var results: MutableList<Media>,
|
var results: MutableList<Media>,
|
||||||
|
@ -37,12 +41,24 @@ data class SearchResults(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
status?.let {
|
||||||
|
list.add(SearchChip("STATUS", currContext()!!.getString(R.string.filter_status, it)))
|
||||||
|
}
|
||||||
|
source?.let {
|
||||||
|
list.add(SearchChip("SOURCE", currContext()!!.getString(R.string.filter_source, it)))
|
||||||
|
}
|
||||||
format?.let {
|
format?.let {
|
||||||
list.add(SearchChip("FORMAT", currContext()!!.getString(R.string.filter_format, it)))
|
list.add(SearchChip("FORMAT", currContext()!!.getString(R.string.filter_format, it)))
|
||||||
}
|
}
|
||||||
|
countryOfOrigin?.let {
|
||||||
|
list.add(SearchChip("COUNTRY", currContext()!!.getString(R.string.filter_country, it)))
|
||||||
|
}
|
||||||
season?.let {
|
season?.let {
|
||||||
list.add(SearchChip("SEASON", it))
|
list.add(SearchChip("SEASON", it))
|
||||||
}
|
}
|
||||||
|
startYear?.let {
|
||||||
|
list.add(SearchChip("START_YEAR", it.toString()))
|
||||||
|
}
|
||||||
seasonYear?.let {
|
seasonYear?.let {
|
||||||
list.add(SearchChip("SEASON_YEAR", it.toString()))
|
list.add(SearchChip("SEASON_YEAR", it.toString()))
|
||||||
}
|
}
|
||||||
|
@ -74,8 +90,12 @@ data class SearchResults(
|
||||||
fun removeChip(chip: SearchChip) {
|
fun removeChip(chip: SearchChip) {
|
||||||
when (chip.type) {
|
when (chip.type) {
|
||||||
"SORT" -> sort = null
|
"SORT" -> sort = null
|
||||||
|
"STATUS" -> status = null
|
||||||
|
"SOURCE" -> source = null
|
||||||
"FORMAT" -> format = null
|
"FORMAT" -> format = null
|
||||||
|
"COUNTRY" -> countryOfOrigin = null
|
||||||
"SEASON" -> season = null
|
"SEASON" -> season = null
|
||||||
|
"START_YEAR" -> startYear = null
|
||||||
"SEASON_YEAR" -> seasonYear = null
|
"SEASON_YEAR" -> seasonYear = null
|
||||||
"GENRE" -> genres?.remove(chip.text)
|
"GENRE" -> genres?.remove(chip.text)
|
||||||
"EXCLUDED_GENRE" -> excludedGenres?.remove(chip.text)
|
"EXCLUDED_GENRE" -> excludedGenres?.remove(chip.text)
|
||||||
|
|
|
@ -74,8 +74,12 @@ class SearchActivity : AppCompatActivity() {
|
||||||
genres = intent.getStringExtra("genre")?.let { mutableListOf(it) },
|
genres = intent.getStringExtra("genre")?.let { mutableListOf(it) },
|
||||||
tags = intent.getStringExtra("tag")?.let { mutableListOf(it) },
|
tags = intent.getStringExtra("tag")?.let { mutableListOf(it) },
|
||||||
sort = intent.getStringExtra("sortBy"),
|
sort = intent.getStringExtra("sortBy"),
|
||||||
|
status = intent.getStringExtra("status"),
|
||||||
|
source = intent.getStringExtra("source"),
|
||||||
|
countryOfOrigin = intent.getStringExtra("country"),
|
||||||
season = intent.getStringExtra("season"),
|
season = intent.getStringExtra("season"),
|
||||||
seasonYear = intent.getStringExtra("seasonYear")?.toIntOrNull(),
|
seasonYear = if (intent.getStringExtra("type") == "ANIME") intent.getStringExtra("seasonYear")?.toIntOrNull() else null,
|
||||||
|
startYear = if (intent.getStringExtra("type") == "MANGA") intent.getStringExtra("seasonYear")?.toIntOrNull() else null,
|
||||||
results = mutableListOf(),
|
results = mutableListOf(),
|
||||||
hasNextPage = false
|
hasNextPage = false
|
||||||
)
|
)
|
||||||
|
@ -134,8 +138,12 @@ class SearchActivity : AppCompatActivity() {
|
||||||
excludedTags = it.excludedTags
|
excludedTags = it.excludedTags
|
||||||
tags = it.tags
|
tags = it.tags
|
||||||
season = it.season
|
season = it.season
|
||||||
|
startYear = it.startYear
|
||||||
seasonYear = it.seasonYear
|
seasonYear = it.seasonYear
|
||||||
|
status = it.status
|
||||||
|
source = it.source
|
||||||
format = it.format
|
format = it.format
|
||||||
|
countryOfOrigin = it.countryOfOrigin
|
||||||
page = it.page
|
page = it.page
|
||||||
hasNextPage = it.hasNextPage
|
hasNextPage = it.hasNextPage
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ import android.view.animation.AlphaAnimation
|
||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.PopupMenu
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -45,6 +47,19 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
private lateinit var searchHistoryAdapter: SearchHistoryAdapter
|
private lateinit var searchHistoryAdapter: SearchHistoryAdapter
|
||||||
private lateinit var binding: ItemSearchHeaderBinding
|
private lateinit var binding: ItemSearchHeaderBinding
|
||||||
|
|
||||||
|
private fun updateFilterTextViewDrawable() {
|
||||||
|
val filterDrawable = when (activity.result.sort) {
|
||||||
|
Anilist.sortBy[0] -> R.drawable.ic_round_area_chart_24
|
||||||
|
Anilist.sortBy[1] -> R.drawable.ic_round_filter_peak_24
|
||||||
|
Anilist.sortBy[2] -> R.drawable.ic_round_star_graph_24
|
||||||
|
Anilist.sortBy[3] -> R.drawable.ic_round_new_releases_24
|
||||||
|
Anilist.sortBy[4] -> R.drawable.ic_round_filter_list_24
|
||||||
|
Anilist.sortBy[5] -> R.drawable.ic_round_filter_list_24_reverse
|
||||||
|
Anilist.sortBy[6] -> R.drawable.ic_round_assist_walker_24
|
||||||
|
else -> R.drawable.ic_round_filter_alt_24
|
||||||
|
}
|
||||||
|
binding.filterTextView.setCompoundDrawablesWithIntrinsicBounds(filterDrawable, 0, 0, 0)
|
||||||
|
}
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SearchHeaderViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SearchHeaderViewHolder {
|
||||||
val binding =
|
val binding =
|
||||||
ItemSearchHeaderBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
ItemSearchHeaderBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||||
|
@ -93,7 +108,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
binding.searchAdultCheck.isChecked = adult
|
binding.searchAdultCheck.isChecked = adult
|
||||||
binding.searchList.isChecked = listOnly == true
|
binding.searchList.isChecked = listOnly == true
|
||||||
|
|
||||||
binding.searchChipRecycler.adapter = SearchChipAdapter(activity).also {
|
binding.searchChipRecycler.adapter = SearchChipAdapter(activity, this).also {
|
||||||
activity.updateChips = { it.update() }
|
activity.updateChips = { it.update() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +118,59 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
binding.searchFilter.setOnClickListener {
|
binding.searchFilter.setOnClickListener {
|
||||||
SearchFilterBottomDialog.newInstance().show(activity.supportFragmentManager, "dialog")
|
SearchFilterBottomDialog.newInstance().show(activity.supportFragmentManager, "dialog")
|
||||||
}
|
}
|
||||||
|
binding.searchFilter.setOnLongClickListener {
|
||||||
|
val popupMenu = PopupMenu(activity, binding.searchFilter)
|
||||||
|
popupMenu.menuInflater.inflate(R.menu.sortby_filter_menu, popupMenu.menu)
|
||||||
|
popupMenu.setOnMenuItemClickListener { item ->
|
||||||
|
when (item.itemId) {
|
||||||
|
R.id.sort_by_score -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[0]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_popular -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[1]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_trending -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[2]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_recent -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[3]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_a_z -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[4]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_z_a -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[5]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
R.id.sort_by_pure_pain -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[6]
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
updateFilterTextViewDrawable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
popupMenu.show()
|
||||||
|
true
|
||||||
|
}
|
||||||
binding.searchByImage.setOnClickListener {
|
binding.searchByImage.setOnClickListener {
|
||||||
activity.startActivity(Intent(activity, ImageSearchActivity::class.java))
|
activity.startActivity(Intent(activity, ImageSearchActivity::class.java))
|
||||||
}
|
}
|
||||||
|
@ -257,7 +325,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class SearchChipAdapter(val activity: SearchActivity) :
|
class SearchChipAdapter(val activity: SearchActivity, private val searchAdapter: SearchAdapter) :
|
||||||
RecyclerView.Adapter<SearchChipAdapter.SearchChipViewHolder>() {
|
RecyclerView.Adapter<SearchChipAdapter.SearchChipViewHolder>() {
|
||||||
private var chips = activity.result.toChipList()
|
private var chips = activity.result.toChipList()
|
||||||
|
|
||||||
|
@ -274,11 +342,12 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
override fun onBindViewHolder(holder: SearchChipViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: SearchChipViewHolder, position: Int) {
|
||||||
val chip = chips[position]
|
val chip = chips[position]
|
||||||
holder.binding.root.apply {
|
holder.binding.root.apply {
|
||||||
text = chip.text
|
text = chip.text.replace("_", " ")
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
activity.result.removeChip(chip)
|
activity.result.removeChip(chip)
|
||||||
update()
|
update()
|
||||||
activity.search()
|
activity.search()
|
||||||
|
searchAdapter.updateFilterTextViewDrawable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +356,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
fun update() {
|
fun update() {
|
||||||
chips = activity.result.toChipList()
|
chips = activity.result.toChipList()
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
|
searchAdapter.updateFilterTextViewDrawable()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int = chips.size
|
override fun getItemCount(): Int = chips.size
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
package ani.dantotsu.media
|
package ani.dantotsu.media
|
||||||
|
|
||||||
|
import android.animation.ObjectAnimator
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.View.GONE
|
import android.view.View.GONE
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.view.animation.AccelerateDecelerateInterpolator
|
||||||
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
|
import android.widget.PopupMenu
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -17,6 +21,9 @@ import ani.dantotsu.connections.anilist.Anilist
|
||||||
import ani.dantotsu.databinding.BottomSheetSearchFilterBinding
|
import ani.dantotsu.databinding.BottomSheetSearchFilterBinding
|
||||||
import ani.dantotsu.databinding.ItemChipBinding
|
import ani.dantotsu.databinding.ItemChipBinding
|
||||||
import com.google.android.material.chip.Chip
|
import com.google.android.material.chip.Chip
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
|
|
||||||
class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
|
@ -38,6 +45,54 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
private var exGenres = mutableListOf<String>()
|
private var exGenres = mutableListOf<String>()
|
||||||
private var selectedTags = mutableListOf<String>()
|
private var selectedTags = mutableListOf<String>()
|
||||||
private var exTags = mutableListOf<String>()
|
private var exTags = mutableListOf<String>()
|
||||||
|
private fun updateChips() {
|
||||||
|
binding.searchFilterGenres.adapter?.notifyDataSetChanged()
|
||||||
|
binding.searchFilterTags.adapter?.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startBounceZoomAnimation(view: View? = null) {
|
||||||
|
val targetView = view ?: binding.sortByFilter
|
||||||
|
val bounceZoomAnimation = AnimationUtils.loadAnimation(requireContext(), R.anim.bounce_zoom)
|
||||||
|
targetView.startAnimation(bounceZoomAnimation)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setSortByFilterImage() {
|
||||||
|
val filterDrawable = when (activity.result.sort) {
|
||||||
|
Anilist.sortBy[0] -> R.drawable.ic_round_area_chart_24
|
||||||
|
Anilist.sortBy[1] -> R.drawable.ic_round_filter_peak_24
|
||||||
|
Anilist.sortBy[2] -> R.drawable.ic_round_star_graph_24
|
||||||
|
Anilist.sortBy[3] -> R.drawable.ic_round_new_releases_24
|
||||||
|
Anilist.sortBy[4] -> R.drawable.ic_round_filter_list_24
|
||||||
|
Anilist.sortBy[5] -> R.drawable.ic_round_filter_list_24_reverse
|
||||||
|
Anilist.sortBy[6] -> R.drawable.ic_round_assist_walker_24
|
||||||
|
else -> R.drawable.ic_round_filter_alt_24
|
||||||
|
}
|
||||||
|
binding.sortByFilter.setImageResource(filterDrawable)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun resetSearchFilter() {
|
||||||
|
activity.result.sort = null
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_filter_alt_24)
|
||||||
|
startBounceZoomAnimation(binding.sortByFilter)
|
||||||
|
activity.result.countryOfOrigin = null
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_search_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
|
||||||
|
selectedGenres.clear()
|
||||||
|
exGenres.clear()
|
||||||
|
selectedTags.clear()
|
||||||
|
exTags.clear()
|
||||||
|
binding.searchStatus.setText("")
|
||||||
|
binding.searchSource.setText("")
|
||||||
|
binding.searchFormat.setText("")
|
||||||
|
binding.searchSeason.setText("")
|
||||||
|
binding.searchYear.setText("")
|
||||||
|
binding.searchStatus.clearFocus()
|
||||||
|
binding.searchFormat.clearFocus()
|
||||||
|
binding.searchSeason.clearFocus()
|
||||||
|
binding.searchYear.clearFocus()
|
||||||
|
updateChips()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
|
||||||
|
@ -47,14 +102,149 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
exGenres = activity.result.excludedGenres ?: mutableListOf()
|
exGenres = activity.result.excludedGenres ?: mutableListOf()
|
||||||
selectedTags = activity.result.tags ?: mutableListOf()
|
selectedTags = activity.result.tags ?: mutableListOf()
|
||||||
exTags = activity.result.excludedTags ?: mutableListOf()
|
exTags = activity.result.excludedTags ?: mutableListOf()
|
||||||
|
setSortByFilterImage()
|
||||||
|
|
||||||
|
binding.resetSearchFilter.setOnClickListener {
|
||||||
|
val rotateAnimation = ObjectAnimator.ofFloat(binding.resetSearchFilter, "rotation", 180f, 540f)
|
||||||
|
rotateAnimation.duration = 500
|
||||||
|
rotateAnimation.interpolator = AccelerateDecelerateInterpolator()
|
||||||
|
rotateAnimation.start()
|
||||||
|
resetSearchFilter()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.resetSearchFilter.setOnLongClickListener {
|
||||||
|
val rotateAnimation = ObjectAnimator.ofFloat(binding.resetSearchFilter, "rotation", 180f, 540f)
|
||||||
|
rotateAnimation.duration = 500
|
||||||
|
rotateAnimation.interpolator = AccelerateDecelerateInterpolator()
|
||||||
|
rotateAnimation.start()
|
||||||
|
val bounceAnimation = AnimationUtils.loadAnimation(requireContext(), R.anim.bounce_zoom)
|
||||||
|
|
||||||
|
binding.resetSearchFilter.startAnimation(bounceAnimation)
|
||||||
|
binding.resetSearchFilter.postDelayed({
|
||||||
|
resetSearchFilter()
|
||||||
|
|
||||||
|
CoroutineScope(Dispatchers.Main).launch {
|
||||||
|
activity.result.apply {
|
||||||
|
status = binding.searchStatus.text.toString().replace(" ", "_").ifBlank { null }
|
||||||
|
source = binding.searchSource.text.toString().replace(" ", "_").ifBlank { null }
|
||||||
|
format = binding.searchFormat.text.toString().ifBlank { null }
|
||||||
|
season = binding.searchSeason.text.toString().ifBlank { null }
|
||||||
|
startYear = binding.searchYear.text.toString().toIntOrNull()
|
||||||
|
seasonYear = binding.searchYear.text.toString().toIntOrNull()
|
||||||
|
sort = activity.result.sort
|
||||||
|
genres = selectedGenres
|
||||||
|
tags = selectedTags
|
||||||
|
excludedGenres = exGenres
|
||||||
|
excludedTags = exTags
|
||||||
|
}
|
||||||
|
activity.updateChips.invoke()
|
||||||
|
activity.search()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.sortByFilter.setOnClickListener {
|
||||||
|
val popupMenu = PopupMenu(requireContext(), it)
|
||||||
|
popupMenu.menuInflater.inflate(R.menu.sortby_filter_menu, popupMenu.menu)
|
||||||
|
popupMenu.setOnMenuItemClickListener { menuItem ->
|
||||||
|
when (menuItem.itemId) {
|
||||||
|
R.id.sort_by_score -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[0]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_area_chart_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_popular -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[1]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_filter_peak_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_trending -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[2]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_star_graph_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_recent -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[3]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_new_releases_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_a_z -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[4]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_filter_list_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_z_a -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[5]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_filter_list_24_reverse)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.sort_by_pure_pain -> {
|
||||||
|
activity.result.sort = Anilist.sortBy[6]
|
||||||
|
binding.sortByFilter.setImageResource(R.drawable.ic_round_assist_walker_24)
|
||||||
|
startBounceZoomAnimation()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
popupMenu.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.countryFilter.setOnClickListener {
|
||||||
|
val popupMenu = PopupMenu(requireContext(), it)
|
||||||
|
popupMenu.menuInflater.inflate(R.menu.country_filter_menu, popupMenu.menu)
|
||||||
|
popupMenu.setOnMenuItemClickListener { menuItem ->
|
||||||
|
when (menuItem.itemId) {
|
||||||
|
R.id.country_global -> {
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_search_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
}
|
||||||
|
R.id.country_china -> {
|
||||||
|
activity.result.countryOfOrigin = "CN"
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_china_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
}
|
||||||
|
R.id.country_south_korea -> {
|
||||||
|
activity.result.countryOfOrigin = "KR"
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_south_korea_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
}
|
||||||
|
R.id.country_japan -> {
|
||||||
|
activity.result.countryOfOrigin = "JP"
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_japan_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
}
|
||||||
|
R.id.country_taiwan -> {
|
||||||
|
activity.result.countryOfOrigin = "TW"
|
||||||
|
binding.countryFilter.setImageResource(R.drawable.ic_round_globe_taiwan_googlefonts)
|
||||||
|
startBounceZoomAnimation(binding.countryFilter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
popupMenu.show()
|
||||||
|
}
|
||||||
|
|
||||||
binding.searchFilterApply.setOnClickListener {
|
binding.searchFilterApply.setOnClickListener {
|
||||||
activity.result.apply {
|
activity.result.apply {
|
||||||
|
status = binding.searchStatus.text.toString().replace(" ", "_").ifBlank { null }
|
||||||
|
source = binding.searchSource.text.toString().replace(" ", "_").ifBlank { null }
|
||||||
format = binding.searchFormat.text.toString().ifBlank { null }
|
format = binding.searchFormat.text.toString().ifBlank { null }
|
||||||
sort = binding.searchSortBy.text.toString().ifBlank { null }
|
|
||||||
?.let { Anilist.sortBy[resources.getStringArray(R.array.sort_by).indexOf(it)] }
|
|
||||||
season = binding.searchSeason.text.toString().ifBlank { null }
|
season = binding.searchSeason.text.toString().ifBlank { null }
|
||||||
seasonYear = binding.searchYear.text.toString().toIntOrNull()
|
if (activity.result.type == "ANIME") {
|
||||||
|
seasonYear = binding.searchYear.text.toString().toIntOrNull()
|
||||||
|
} else {
|
||||||
|
startYear = binding.searchYear.text.toString().toIntOrNull()
|
||||||
|
}
|
||||||
|
sort = activity.result.sort
|
||||||
|
countryOfOrigin = activity.result.countryOfOrigin
|
||||||
genres = selectedGenres
|
genres = selectedGenres
|
||||||
tags = selectedTags
|
tags = selectedTags
|
||||||
excludedGenres = exGenres
|
excludedGenres = exGenres
|
||||||
|
@ -67,15 +257,22 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
binding.searchFilterCancel.setOnClickListener {
|
binding.searchFilterCancel.setOnClickListener {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
|
val format = if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus
|
||||||
binding.searchSortBy.setText(activity.result.sort?.let {
|
binding.searchStatus.setText(activity.result.status?.replace("_", " "))
|
||||||
resources.getStringArray(R.array.sort_by)[Anilist.sortBy.indexOf(it)]
|
binding.searchStatus.setAdapter(
|
||||||
})
|
|
||||||
binding.searchSortBy.setAdapter(
|
|
||||||
ArrayAdapter(
|
ArrayAdapter(
|
||||||
binding.root.context,
|
binding.root.context,
|
||||||
R.layout.item_dropdown,
|
R.layout.item_dropdown,
|
||||||
resources.getStringArray(R.array.sort_by)
|
format
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.searchSource.setText(activity.result.source?.replace("_", " "))
|
||||||
|
binding.searchSource.setAdapter(
|
||||||
|
ArrayAdapter(
|
||||||
|
binding.root.context,
|
||||||
|
R.layout.item_dropdown,
|
||||||
|
Anilist.source.toTypedArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -84,11 +281,25 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
ArrayAdapter(
|
ArrayAdapter(
|
||||||
binding.root.context,
|
binding.root.context,
|
||||||
R.layout.item_dropdown,
|
R.layout.item_dropdown,
|
||||||
(if (activity.result.type == "ANIME") Anilist.anime_formats else Anilist.manga_formats).toTypedArray()
|
(if (activity.result.type == "ANIME") Anilist.animeFormats else Anilist.mangaFormats).toTypedArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (activity.result.type == "MANGA") binding.searchSeasonYearCont.visibility = GONE
|
if (activity.result.type == "ANIME") {
|
||||||
|
binding.searchYear.setText(activity.result.seasonYear?.toString())
|
||||||
|
} else {
|
||||||
|
binding.searchYear.setText(activity.result.startYear?.toString())
|
||||||
|
}
|
||||||
|
binding.searchYear.setAdapter(
|
||||||
|
ArrayAdapter(
|
||||||
|
binding.root.context,
|
||||||
|
R.layout.item_dropdown,
|
||||||
|
(1970 until Calendar.getInstance().get(Calendar.YEAR) + 2).map { it.toString() }
|
||||||
|
.reversed().toTypedArray()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if (activity.result.type == "MANGA") binding.searchSeasonCont.visibility = GONE
|
||||||
else {
|
else {
|
||||||
binding.searchSeason.setText(activity.result.season)
|
binding.searchSeason.setText(activity.result.season)
|
||||||
binding.searchSeason.setAdapter(
|
binding.searchSeason.setAdapter(
|
||||||
|
@ -98,16 +309,6 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||||
Anilist.seasons.toTypedArray()
|
Anilist.seasons.toTypedArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
binding.searchYear.setText(activity.result.seasonYear?.toString())
|
|
||||||
binding.searchYear.setAdapter(
|
|
||||||
ArrayAdapter(
|
|
||||||
binding.root.context,
|
|
||||||
R.layout.item_dropdown,
|
|
||||||
(1970 until Calendar.getInstance().get(Calendar.YEAR) + 2).map { it.toString() }
|
|
||||||
.reversed().toTypedArray()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.searchFilterGenres.adapter = FilterChipAdapter(Anilist.genres ?: listOf()) { chip ->
|
binding.searchFilterGenres.adapter = FilterChipAdapter(Anilist.genres ?: listOf()) { chip ->
|
||||||
|
|
|
@ -154,22 +154,23 @@ class ProfileFragment : Fragment() {
|
||||||
private fun setFavPeople() {
|
private fun setFavPeople() {
|
||||||
if (favStaff.isEmpty()) {
|
if (favStaff.isEmpty()) {
|
||||||
binding.profileFavStaffContainer.visibility = View.GONE
|
binding.profileFavStaffContainer.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
binding.profileFavStaffRecycler.adapter = AuthorAdapter(favStaff)
|
||||||
|
binding.profileFavStaffRecycler.layoutManager = LinearLayoutManager(
|
||||||
|
activity, LinearLayoutManager.HORIZONTAL, false
|
||||||
|
)
|
||||||
|
binding.profileFavStaffRecycler.layoutAnimation = LayoutAnimationController(setSlideIn(), 0.25f)
|
||||||
}
|
}
|
||||||
binding.profileFavStaffRecycler.adapter = AuthorAdapter(favStaff)
|
|
||||||
binding.profileFavStaffRecycler.layoutManager = LinearLayoutManager(
|
|
||||||
activity,
|
|
||||||
LinearLayoutManager.HORIZONTAL,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
if (favCharacter.isEmpty()) {
|
if (favCharacter.isEmpty()) {
|
||||||
binding.profileFavCharactersContainer.visibility = View.GONE
|
binding.profileFavCharactersContainer.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
binding.profileFavCharactersRecycler.adapter = CharacterAdapter(favCharacter)
|
||||||
|
binding.profileFavCharactersRecycler.layoutManager = LinearLayoutManager(
|
||||||
|
activity, LinearLayoutManager.HORIZONTAL, false
|
||||||
|
)
|
||||||
|
binding.profileFavCharactersRecycler.layoutAnimation = LayoutAnimationController(setSlideIn(), 0.25f)
|
||||||
}
|
}
|
||||||
binding.profileFavCharactersRecycler.adapter = CharacterAdapter(favCharacter)
|
|
||||||
binding.profileFavCharactersRecycler.layoutManager = LinearLayoutManager(
|
|
||||||
activity,
|
|
||||||
LinearLayoutManager.HORIZONTAL,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initRecyclerView(
|
private fun initRecyclerView(
|
||||||
|
|
12
app/src/main/res/drawable/ic_round_area_chart_24.xml
Normal file
12
app/src/main/res/drawable/ic_round_area_chart_24.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M8,17l3.39,-4.66c0.33,-0.46 0.98,-0.55 1.42,-0.2L21,18.5V19c0,0.55 -0.45,1 -1,1H4c-0.55,0 -1,-0.45 -1,-1l0,-5.72c0.22,0 0.44,0.07 0.62,0.22L8,17zM3,11c0.44,0 0.88,0.15 1.25,0.44l3.37,2.69l2.77,-3.81c0.66,-0.91 1.95,-1.1 2.85,-0.4L21,15.97V8c0,-0.55 -0.45,-1 -1,-1h-3l-4.18,-3.34c-0.45,-0.36 -1.1,-0.27 -1.44,0.2L7,10L3.6,7.45C3.42,7.32 3.21,7.25 3,7.25L3,11z" />
|
||||||
|
|
||||||
|
</vector>
|
16
app/src/main/res/drawable/ic_round_assist_walker_24.xml
Normal file
16
app/src/main/res/drawable/ic_round_assist_walker_24.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12.5,4.5m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M19.77,17.72l-0.64,-6.37C19.06,10.58 18.41,10 17.64,10H16c-1.5,-0.02 -2.86,-0.54 -3.76,-1.44l-2,-1.98C10.08,6.42 9.62,6 8.83,6C8.32,6 7.81,6.2 7.42,6.59L4.08,9.91c-0.53,0.68 -0.51,1.57 -0.21,2.13l1.43,2.8L2.75,18.1c-0.34,0.43 -0.26,1.06 0.17,1.4l0,0c0.44,0.34 1.07,0.26 1.41,-0.17l2.56,-3.29c0.33,-0.42 0.47,-0.95 0.41,-1.48l-0.07,-0.53L8,14.75V19c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1v-4.29c0,-0.53 -0.21,-1.04 -0.59,-1.41l-1.53,-1.53l2.36,-2.36c0.94,0.94 1.72,1.82 3.59,2.32l-0.75,7.46c-0.04,0.44 0.3,0.83 0.75,0.83h0c0.38,0 0.7,-0.29 0.75,-0.66l0.33,-2.84h3.18l0.14,1.22c-0.44,0.26 -0.73,0.74 -0.73,1.28c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5C20.5,18.46 20.21,17.98 19.77,17.72zM15.09,15l0.41,-3.5h2l0.41,3.5H15.09z" />
|
||||||
|
|
||||||
|
</vector>
|
|
@ -1,16 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#000000"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M12.5,4.5m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/>
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M19.77,17.72l-0.64,-6.37C19.06,10.58 18.41,10 17.64,10H16c-1.5,-0.02 -2.86,-0.54 -3.76,-1.44l-2,-1.98C10.08,6.42 9.62,6 8.83,6C8.32,6 7.81,6.2 7.42,6.59L4.08,9.91c-0.53,0.68 -0.51,1.57 -0.21,2.13l1.43,2.8l-3.15,4.05l1.57,1.24l3.68,-4.73l-0.17,-1.36L8,14.75V20h2v-6.12l-2.12,-2.12l2.36,-2.36c0.94,0.94 1.72,1.82 3.59,2.32L13,20h1.5l0.41,-3.5h3.18l0.14,1.22c-0.44,0.26 -0.73,0.74 -0.73,1.28c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5C20.5,18.46 20.21,17.98 19.77,17.72zM15.09,15l0.41,-3.5h2l0.41,3.5H15.09z"/>
|
|
||||||
|
|
||||||
</vector>
|
|
12
app/src/main/res/drawable/ic_round_filter_list_24.xml
Normal file
12
app/src/main/res/drawable/ic_round_filter_list_24.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M11,18h2c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1h-2c-0.55,0 -1,0.45 -1,1s0.45,1 1,1zM3,7c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L4,6c-0.55,0 -1,0.45 -1,1zM7,13h10c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L7,11c-0.55,0 -1,0.45 -1,1s0.45,1 1,1z" />
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M11,6h2c0.55,0 1,0.45 1,1s-0.45,1 -1,1h-2c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1zM3,17c0,-0.55 0.45,-1 1,-1h16c0.55,0 1,0.45 1,1s-0.45,1 -1,1L4,18c-0.55,0 -1,-0.45 -1,-1zM7,11h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1L7,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1z" />
|
||||||
|
|
||||||
|
</vector>
|
12
app/src/main/res/drawable/ic_round_filter_peak_24.xml
Normal file
12
app/src/main/res/drawable/ic_round_filter_peak_24.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M13.2,7.07L10.25,11l2.25,3c0.33,0.44 0.24,1.07 -0.2,1.4 -0.44,0.33 -1.07,0.25 -1.4,-0.2 -1.05,-1.4 -2.31,-3.07 -3.1,-4.14 -0.4,-0.53 -1.2,-0.53 -1.6,0l-4,5.33c-0.49,0.67 -0.02,1.61 0.8,1.61h18c0.82,0 1.29,-0.94 0.8,-1.6l-7,-9.33c-0.4,-0.54 -1.2,-0.54 -1.6,0z" />
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M480,800q18,0 34.5,-2t33.5,-6l-48,-72L360,720v-40q0,-33 23.5,-56.5T440,600h80v-120h-80q-17,0 -28.5,-11.5T400,440v-80h-18q-26,0 -44,-17.5T320,299q0,-9 2.5,-18t7.5,-17l62,-91q-101,29 -166.5,113T160,480h40v-40q0,-17 11.5,-28.5T240,400h80q17,0 28.5,11.5T360,440v40q0,17 -11.5,28.5T320,520v40q0,33 -23.5,56.5T240,640h-37q42,72 115,116t162,44ZM784,578q8,-23 12,-47.5t4,-50.5q0,-112 -68,-197.5T560,170v110q33,0 56.5,23.5T640,360v80q19,0 34,4.5t29,18.5l81,115ZM480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880Z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM440,798v-78q-33,0 -56.5,-23.5T360,640v-40L168,408q-3,18 -5.5,36t-2.5,36q0,121 79.5,212T440,798ZM716,696q20,-22 36,-47.5t26.5,-53q10.5,-27.5 16,-56.5t5.5,-59q0,-98 -54.5,-179T600,184v16q0,33 -23.5,56.5T520,280h-80v80q0,17 -11.5,28.5T400,400h-80v80h240q17,0 28.5,11.5T600,520v120h40q26,0 47,15.5t29,40.5Z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q127,0 226.5,70T851,331q7,17 0.5,34T828,388q-16,5 -30.5,-3T777,361q-24,-60 -69,-106t-108,-71v16q0,33 -23.5,56.5T520,280h-80v80q0,17 -11.5,28.5T400,400h-80v80h40q17,0 28.5,11.5T400,520v80h-40L168,408q-3,18 -5.5,36t-2.5,36q0,122 80.5,213T443,798q16,2 26.5,13.5T480,840q0,17 -11.5,28.5T441,878Q288,863 184,750T80,480ZM816,832L716,732q-21,12 -45,20t-51,8q-75,0 -127.5,-52.5T440,580q0,-75 52.5,-127.5T620,400q75,0 127.5,52.5T800,580q0,27 -8,51t-20,45l100,100q11,11 11,28t-11,28q-11,11 -28,11t-28,-11ZM620,680q42,0 71,-29t29,-71q0,-42 -29,-71t-71,-29q-42,0 -71,29t-29,71q0,42 29,71t71,29Z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q134,0 227,-93t93,-227q0,-7 -0.5,-14.5T799,453q-5,29 -27,48t-52,19h-80q-33,0 -56.5,-23.5T560,440v-40L400,400v-80q0,-33 23.5,-56.5T480,240h40q0,-23 12.5,-40.5T563,171q-20,-5 -40.5,-8t-42.5,-3q-134,0 -227,93t-93,227h200q66,0 113,47t47,113v40L400,680v110q20,5 39.5,7.5T480,800Z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M472,801q-33,0 -56.5,-24T392,720q0,-33 23.5,-56.5T472,640l24,-23q8,-8 18.5,-12.5T536,600q23,0 39.5,17t16.5,40v17q0,20 13,33t33,13q15,0 27,-9t17,-23l12,-33q9,-24 29,-39.5t46,-15.5q11,-28 17.5,-58t6.5,-62q0,-89 -44.5,-162.5T632,202v38q0,33 -23.5,56.5T552,320h-40v80q0,17 -11.5,28.5T472,440h-40v68q0,22 -15,37t-37,15q-14,0 -25.5,-6T336,537l-64,-97h-40v40q0,31 -21,53t-50,26q26,104 112.5,173T472,801ZM552,560q-17,0 -28.5,-11.5T512,520q0,-17 11.5,-28.5T552,480h40q17,0 28.5,11.5T632,520q0,17 -11.5,28.5T592,560h-40ZM645,440q-20,0 -31.5,-15.5T608,390l15,-44q4,-12 14,-19t22,-7q20,0 31.5,15.5T696,370l-15,44q-4,12 -14,19t-22,7ZM472,880q-83,0 -156,-31.5T189,763q-54,-54 -85.5,-127T72,480q0,-83 31.5,-156T189,197q54,-54 127,-85.5T472,80q83,0 156,31.5T755,197q54,54 85.5,127T872,480q0,83 -31.5,156T755,763q-54,54 -127,85.5T472,880Z"/>
|
||||||
|
</vector>
|
32
app/src/main/res/drawable/ic_round_reset_star_24.xml
Normal file
32
app/src/main/res/drawable/ic_round_reset_star_24.xml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M18.06,2.83c-1.15,-0.77 -2.46,-1.32 -3.86,-1.61C13.58,1.1 13,1.57 13,2.21v0c0,0.46 0.31,0.88 0.76,0.97c1.17,0.23 2.26,0.7 3.21,1.34c0.39,0.26 0.9,0.19 1.23,-0.14l0,0C18.66,3.93 18.59,3.18 18.06,2.83z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M11,2.21L11,2.21c0,-0.64 -0.58,-1.11 -1.2,-0.99c-1.4,0.29 -2.71,0.84 -3.86,1.61c-0.52,0.35 -0.59,1.1 -0.15,1.54l0,0c0.33,0.33 0.84,0.4 1.23,0.14c0.96,-0.64 2.04,-1.1 3.21,-1.34C10.69,3.09 11,2.67 11,2.21z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M4.38,5.79L4.38,5.79C3.93,5.34 3.18,5.42 2.84,5.94C2.07,7.09 1.51,8.39 1.23,9.8C1.1,10.42 1.58,11 2.21,11h0c0.46,0 0.88,-0.31 0.97,-0.76c0.23,-1.17 0.7,-2.26 1.34,-3.22C4.77,6.64 4.7,6.12 4.38,5.79z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M21.79,11L21.79,11c0.63,0 1.11,-0.58 0.98,-1.2c-0.29,-1.4 -0.84,-2.7 -1.61,-3.86c-0.35,-0.52 -1.1,-0.6 -1.54,-0.15l0,0c-0.33,0.33 -0.4,0.84 -0.14,1.23c0.64,0.96 1.1,2.05 1.34,3.22C20.91,10.69 21.33,11 21.79,11z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M8,12.46l2.44,1.11L11.54,16c0.18,0.39 0.73,0.39 0.91,0l1.11,-2.44L16,12.46c0.39,-0.18 0.39,-0.73 0,-0.91l-2.44,-1.11L12.46,8c-0.18,-0.39 -0.73,-0.39 -0.91,0l-1.11,2.44L8,11.54C7.61,11.72 7.61,12.28 8,12.46z" />
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,21c-3.11,0 -5.85,-1.59 -7.46,-4H6c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H2c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1v-1.7c1.99,2.84 5.27,4.7 9,4.7c4.45,0 8.27,-2.64 10,-6.43c0.26,-0.57 -0.08,-1.25 -0.69,-1.39l0,0c-0.45,-0.1 -0.93,0.11 -1.12,0.54C18.77,18.83 15.64,21 12,21z" />
|
||||||
|
|
||||||
|
</vector>
|
12
app/src/main/res/drawable/ic_round_star_graph_24.xml
Normal file
12
app/src/main/res/drawable/ic_round_star_graph_24.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M14.06,9.94L13,9.45c-0.39,-0.18 -0.39,-0.73 0,-0.91l1.06,-0.49L14.55,7c0.18,-0.39 0.73,-0.39 0.91,0l0.49,1.06L17,8.55c0.39,0.18 0.39,0.73 0,0.91l-1.06,0.49L15.45,11c-0.18,0.39 -0.73,0.39 -0.91,0L14.06,9.94zM4.45,13l0.49,-1.06L6,11.45c0.39,-0.18 0.39,-0.73 0,-0.91l-1.06,-0.49L4.45,9C4.28,8.61 3.72,8.61 3.55,9l-0.49,1.06L2,10.55c-0.39,0.18 -0.39,0.73 0,0.91l1.06,0.49L3.55,13C3.72,13.39 4.28,13.39 4.45,13zM8.96,7.99l0.63,-1.4l1.4,-0.63c0.39,-0.18 0.39,-0.73 0,-0.91l-1.4,-0.63l-0.63,-1.4c-0.18,-0.39 -0.73,-0.39 -0.91,0l-0.63,1.4l-1.4,0.63c-0.39,0.18 -0.39,0.73 0,0.91l1.4,0.63l0.63,1.4C8.22,8.38 8.78,8.38 8.96,7.99zM22.34,8.27c-0.4,-0.4 -1.07,-0.39 -1.45,0.04l-6.39,7.18l-3.29,-3.29c-0.39,-0.39 -1.02,-0.39 -1.41,0l-6.04,6.05c-0.41,0.41 -0.41,1.09 0,1.5c0.41,0.41 1.09,0.41 1.5,0l5.25,-5.26l3.25,3.25c0.41,0.41 1.07,0.39 1.45,-0.04l7.17,-8.07C22.73,9.24 22.71,8.64 22.34,8.27z" />
|
||||||
|
|
||||||
|
</vector>
|
|
@ -749,7 +749,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:drawableStart="@drawable/ic_round_early_bird_special"
|
android:drawableStart="@drawable/ic_round_assist_walker_24"
|
||||||
android:drawablePadding="16dp"
|
android:drawablePadding="16dp"
|
||||||
android:elegantTextHeight="true"
|
android:elegantTextHeight="true"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
|
|
@ -1318,7 +1318,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:drawableStart="@drawable/ic_round_early_bird_special"
|
android:drawableStart="@drawable/ic_round_assist_walker_24"
|
||||||
android:drawablePadding="16dp"
|
android:drawablePadding="16dp"
|
||||||
android:elegantTextHeight="true"
|
android:elegantTextHeight="true"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
|
|
@ -1,288 +1,382 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bottom_sheet_background">
|
android:background="@drawable/bottom_sheet_background">
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="64dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="17dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/resetSearchFilter"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="start|center_vertical"
|
||||||
|
android:layout_marginStart="17dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:rotation="180"
|
||||||
|
android:src="@drawable/ic_round_reset_star_24"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bottomSheerCustomTitle"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="45dp"
|
||||||
|
android:layout_marginTop="-2dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:text="@string/filter"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="23sp" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/countryFilter"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_round_globe_search_googlefonts"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/sortByFilter"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="17dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_round_filter_alt_24"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/source"
|
||||||
|
app:boxCornerRadiusBottomEnd="16dp"
|
||||||
|
app:boxCornerRadiusBottomStart="16dp"
|
||||||
|
app:boxCornerRadiusTopEnd="16dp"
|
||||||
|
app:boxCornerRadiusTopStart="16dp"
|
||||||
|
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchSource"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/format"
|
||||||
|
app:boxCornerRadiusBottomEnd="16dp"
|
||||||
|
app:boxCornerRadiusBottomStart="16dp"
|
||||||
|
app:boxCornerRadiusTopEnd="16dp"
|
||||||
|
app:boxCornerRadiusTopStart="16dp"
|
||||||
|
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchFormat"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/status_title"
|
||||||
|
app:boxCornerRadiusBottomEnd="16dp"
|
||||||
|
app:boxCornerRadiusBottomStart="16dp"
|
||||||
|
app:boxCornerRadiusTopEnd="16dp"
|
||||||
|
app:boxCornerRadiusTopStart="16dp"
|
||||||
|
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchStatus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:id="@+id/searchSeasonCont"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/season"
|
||||||
|
app:boxCornerRadiusBottomEnd="16dp"
|
||||||
|
app:boxCornerRadiusBottomStart="16dp"
|
||||||
|
app:boxCornerRadiusTopEnd="16dp"
|
||||||
|
app:boxCornerRadiusTopStart="16dp"
|
||||||
|
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchSeason"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/year"
|
||||||
|
app:boxCornerRadiusBottomEnd="16dp"
|
||||||
|
app:boxCornerRadiusBottomStart="16dp"
|
||||||
|
app:boxCornerRadiusTopEnd="16dp"
|
||||||
|
app:boxCornerRadiusTopStart="16dp"
|
||||||
|
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchYear"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/genres"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:text="@string/grid" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/searchGenresGrid"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/searchFilterGenres"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:fadingEdge="horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:spanCount="6"
|
||||||
|
tools:listitem="@layout/item_chip" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/tags"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:text="@string/grid" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/searchTagsGrid"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/searchFilterTags"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:fadeScrollbars="true"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:spanCount="6"
|
||||||
|
tools:listitem="@layout/item_chip" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_gravity="bottom"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:id="@+id/bottomSheerCustomTitle"
|
android:id="@+id/searchFilterCancel"
|
||||||
android:layout_width="wrap_content"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_gravity="center"
|
android:layout_height="56dp"
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
|
||||||
android:text="@string/filter"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="20sp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_round_filter_alt_24" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:baselineAligned="false"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:text="@string/cancel"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:cornerRadius="16dp"
|
||||||
|
app:strokeColor="?attr/colorPrimaryContainer"
|
||||||
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<Button
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
android:id="@+id/searchFilterApply"
|
||||||
android:layout_width="match_parent"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:hint="@string/sort_by"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
|
||||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
|
||||||
app:hintAnimationEnabled="true">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/searchSortBy"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:freezesText="false"
|
|
||||||
android:inputType="none"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:hint="@string/format"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
|
||||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
|
||||||
app:hintAnimationEnabled="true">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/searchFormat"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:freezesText="false"
|
|
||||||
android:inputType="none"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/searchSeasonYearCont"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:baselineAligned="false"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
android:insetBottom="0dp"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
android:padding="8dp"
|
||||||
android:layout_width="match_parent"
|
android:text="@string/apply"
|
||||||
android:layout_height="match_parent"
|
android:textSize="16sp"
|
||||||
android:layout_marginStart="8dp"
|
app:cornerRadius="16dp"
|
||||||
android:layout_marginEnd="8dp"
|
app:strokeColor="?attr/colorPrimaryContainer"
|
||||||
android:layout_weight="1"
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
android:hint="@string/season"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
|
||||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
|
||||||
app:hintAnimationEnabled="true">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/searchSeason"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:freezesText="false"
|
|
||||||
android:inputType="none"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:hint="@string/year"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
|
||||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
|
||||||
app:hintAnimationEnabled="true">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/searchYear"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:freezesText="false"
|
|
||||||
android:inputType="none"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:text="@string/genres"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/searchGenresGrid"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/grid" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/searchFilterGenres"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fadingEdge="horizontal"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
app:spanCount="6"
|
|
||||||
tools:listitem="@layout/item_chip" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:text="@string/tags"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/searchTagsGrid"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/grid" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/searchFilterTags"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fadeScrollbars="true"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
app:spanCount="6"
|
|
||||||
tools:listitem="@layout/item_chip" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/searchFilterCancel"
|
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/cancel"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:strokeColor="?attr/colorPrimaryContainer"
|
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/searchFilterApply"
|
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/apply"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:strokeColor="?attr/colorPrimaryContainer"
|
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</FrameLayout>
|
|
@ -150,6 +150,7 @@
|
||||||
tools:ignore="ContentDescription,TextContrastCheck">
|
tools:ignore="ContentDescription,TextContrastCheck">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/filterTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
18
app/src/main/res/menu/country_filter_menu.xml
Normal file
18
app/src/main/res/menu/country_filter_menu.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@+id/country_global"
|
||||||
|
android:title="Global" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/country_china"
|
||||||
|
android:title="China" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/country_south_korea"
|
||||||
|
android:title="South Korea" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/country_japan"
|
||||||
|
android:title="Japan" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/country_taiwan"
|
||||||
|
android:title="Taiwan" />
|
||||||
|
</menu>
|
24
app/src/main/res/menu/sortby_filter_menu.xml
Normal file
24
app/src/main/res/menu/sortby_filter_menu.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_score"
|
||||||
|
android:title="Score" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_popular"
|
||||||
|
android:title="Popular" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_trending"
|
||||||
|
android:title="Trending" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_recent"
|
||||||
|
android:title="New Releases" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_a_z"
|
||||||
|
android:title="A-Z" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_z_a"
|
||||||
|
android:title="Z-A" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/sort_by_pure_pain"
|
||||||
|
android:title="Pure pain" />
|
||||||
|
</menu>
|
|
@ -506,6 +506,7 @@
|
||||||
<item>Score</item>
|
<item>Score</item>
|
||||||
<item>Popular</item>
|
<item>Popular</item>
|
||||||
<item>Trending</item>
|
<item>Trending</item>
|
||||||
|
<item>New Releases</item>
|
||||||
<item>A-Z</item>
|
<item>A-Z</item>
|
||||||
<item>Z-A</item>
|
<item>Z-A</item>
|
||||||
<item>Pure pain</item>
|
<item>Pure pain</item>
|
||||||
|
@ -661,7 +662,10 @@
|
||||||
<string name="chapter_singular">Chapter</string>
|
<string name="chapter_singular">Chapter</string>
|
||||||
<string name="chapter_plural">Chapters</string>
|
<string name="chapter_plural">Chapters</string>
|
||||||
|
|
||||||
|
<string name="filter_status">"Status : %1$s"</string>
|
||||||
|
<string name="filter_source">"Source : %1$s"</string>
|
||||||
<string name="filter_format">"Format : %1$s"</string>
|
<string name="filter_format">"Format : %1$s"</string>
|
||||||
|
<string name="filter_country">"Country : %1$s"</string>
|
||||||
<string name="filter_sort">"Sort : %1$s"</string>
|
<string name="filter_sort">"Sort : %1$s"</string>
|
||||||
<string name="filter_exclude">"Not %1$s"</string>
|
<string name="filter_exclude">"Not %1$s"</string>
|
||||||
<string name="search_by_image">Search by Image</string>
|
<string name="search_by_image">Search by Image</string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue