Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aayush262 2024-04-02 17:02:56 +05:30
commit b2a44cfe09
36 changed files with 1268 additions and 393 deletions

View file

@ -6,6 +6,10 @@ plugins {
id 'com.google.devtools.ksp'
}
def gitCommitHash = providers.exec {
commandLine("git", "rev-parse", "--verify", "--short", "HEAD")
}.standardOutput.asText.get().trim()
android {
compileSdk 34
@ -38,7 +42,7 @@ android {
buildTypes {
alpha {
applicationIdSuffix ".beta" // keep as beta by popular request
versionNameSuffix "-alpha01"
versionNameSuffix "-alpha01-" + gitCommitHash
manifestPlaceholders.icon_placeholder = "@mipmap/ic_launcher_alpha"
manifestPlaceholders.icon_placeholder_round = "@mipmap/ic_launcher_alpha_round"
debuggable System.getenv("CI") == null

View file

@ -41,20 +41,54 @@ object Anilist {
"SCORE_DESC",
"POPULARITY_DESC",
"TRENDING_DESC",
"START_DATE_DESC",
"TITLE_ENGLISH",
"TITLE_ENGLISH_DESC",
"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(
"WINTER", "SPRING", "SUMMER", "FALL"
)
val anime_formats = listOf(
val animeFormats = listOf(
"TV", "TV SHORT", "MOVIE", "SPECIAL", "OVA", "ONA", "MUSIC"
)
val manga_formats = listOf(
val mangaFormats = listOf(
"MANGA", "NOVEL", "ONE SHOT"
)

View file

@ -885,11 +885,15 @@ class AnilistQueries {
sort: String? = null,
genres: MutableList<String>? = null,
tags: MutableList<String>? = null,
status: String? = null,
source: String? = null,
format: String? = null,
countryOfOrigin: String? = null,
isAdult: Boolean = false,
onList: Boolean? = null,
excludedGenres: MutableList<String>? = null,
excludedTags: MutableList<String>? = null,
startYear: Int? = null,
seasonYear: Int? = null,
season: String? = null,
id: Int? = null,
@ -897,7 +901,7 @@ class AnilistQueries {
adultOnly: Boolean = false
): SearchResults? {
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}) {
pageInfo {
total
@ -946,11 +950,15 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
${if (onList != null) ""","onList":$onList""" else ""}
${if (page != null) ""","page":"$page"""" 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 (search != null) ""","search":"$search"""" else ""}
${if (source != null) ""","source":"$source"""" else ""}
${if (sort != null) ""","sort":"$sort"""" else ""}
${if (status != null) ""","status":"$status"""" else ""}
${if (format != null) ""","format":"${format.replace(" ", "_")}"""" else ""}
${if (countryOfOrigin != null) ""","countryOfOrigin":"$countryOfOrigin"""" else ""}
${if (genres?.isNotEmpty() == true) ""","genres":[${genres.joinToString { "\"$it\"" }}]""" else ""}
${
if (excludedGenres?.isNotEmpty() == true)
@ -982,7 +990,6 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
else ""
}
}""".replace("\n", " ").replace(""" """, "")
val response = executeQuery<Query.Page>(query, variables, true)?.data?.page
if (response?.media != null) {
val responseArray = arrayListOf<Media>()
@ -1014,7 +1021,11 @@ query (${"$"}page: Int = 1, ${"$"}id: Int, ${"$"}type: MediaType, ${"$"}isAdult:
excludedGenres = excludedGenres,
tags = tags,
excludedTags = excludedTags,
status = status,
source = source,
format = format,
countryOfOrigin = countryOfOrigin,
startYear = startYear,
seasonYear = seasonYear,
season = season,
results = responseArray,

View file

@ -176,7 +176,10 @@ class AnilistAnimeViewModel : ViewModel() {
r.sort,
r.genres,
r.tags,
r.status,
r.source,
r.format,
r.countryOfOrigin,
r.isAdult,
r.onList,
adultOnly = PrefManager.getVal(PrefName.AdultOnly),
@ -281,11 +284,15 @@ class AnilistMangaViewModel : ViewModel() {
r.sort,
r.genres,
r.tags,
r.status,
r.source,
r.format,
r.countryOfOrigin,
r.isAdult,
r.onList,
r.excludedGenres,
r.excludedTags,
r.startYear,
r.seasonYear,
r.season,
adultOnly = PrefManager.getVal(PrefName.AdultOnly)
@ -342,11 +349,15 @@ class AnilistSearch : ViewModel() {
r.sort,
r.genres,
r.tags,
r.status,
r.source,
r.format,
r.countryOfOrigin,
r.isAdult,
r.onList,
r.excludedGenres,
r.excludedTags,
r.startYear,
r.seasonYear,
r.season,
)
@ -361,11 +372,15 @@ class AnilistSearch : ViewModel() {
r.sort,
r.genres,
r.tags,
r.status,
r.source,
r.format,
r.countryOfOrigin,
r.isAdult,
r.onList,
r.excludedGenres,
r.excludedTags,
r.startYear,
r.seasonYear,
r.season
)

View file

@ -11,13 +11,17 @@ data class SearchResults(
var onList: Boolean? = null,
var perPage: Int? = null,
var search: String? = null,
var countryOfOrigin :String? = null,
var sort: String? = null,
var genres: MutableList<String>? = null,
var excludedGenres: MutableList<String>? = null,
var tags: MutableList<String>? = null,
var excludedTags: MutableList<String>? = null,
var status: String? = null,
var source: String? = null,
var format: String? = null,
var seasonYear: Int? = null,
var startYear: Int? = null,
var season: String? = null,
var page: Int = 1,
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 {
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 {
list.add(SearchChip("SEASON", it))
}
startYear?.let {
list.add(SearchChip("START_YEAR", it.toString()))
}
seasonYear?.let {
list.add(SearchChip("SEASON_YEAR", it.toString()))
}
@ -74,8 +90,12 @@ data class SearchResults(
fun removeChip(chip: SearchChip) {
when (chip.type) {
"SORT" -> sort = null
"STATUS" -> status = null
"SOURCE" -> source = null
"FORMAT" -> format = null
"COUNTRY" -> countryOfOrigin = null
"SEASON" -> season = null
"START_YEAR" -> startYear = null
"SEASON_YEAR" -> seasonYear = null
"GENRE" -> genres?.remove(chip.text)
"EXCLUDED_GENRE" -> excludedGenres?.remove(chip.text)

View file

@ -74,8 +74,12 @@ class SearchActivity : AppCompatActivity() {
genres = intent.getStringExtra("genre")?.let { mutableListOf(it) },
tags = intent.getStringExtra("tag")?.let { mutableListOf(it) },
sort = intent.getStringExtra("sortBy"),
status = intent.getStringExtra("status"),
source = intent.getStringExtra("source"),
countryOfOrigin = intent.getStringExtra("country"),
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(),
hasNextPage = false
)
@ -134,8 +138,12 @@ class SearchActivity : AppCompatActivity() {
excludedTags = it.excludedTags
tags = it.tags
season = it.season
startYear = it.startYear
seasonYear = it.seasonYear
status = it.status
source = it.source
format = it.format
countryOfOrigin = it.countryOfOrigin
page = it.page
hasNextPage = it.hasNextPage
}

View file

@ -13,6 +13,8 @@ import android.view.animation.AlphaAnimation
import android.view.animation.Animation
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager
import android.widget.ImageView
import android.widget.PopupMenu
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.content.res.AppCompatResources
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 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 {
val binding =
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.searchList.isChecked = listOnly == true
binding.searchChipRecycler.adapter = SearchChipAdapter(activity).also {
binding.searchChipRecycler.adapter = SearchChipAdapter(activity, this).also {
activity.updateChips = { it.update() }
}
@ -103,6 +118,59 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
binding.searchFilter.setOnClickListener {
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 {
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>() {
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) {
val chip = chips[position]
holder.binding.root.apply {
text = chip.text
text = chip.text.replace("_", " ")
setOnClickListener {
activity.result.removeChip(chip)
update()
activity.search()
searchAdapter.updateFilterTextViewDrawable()
}
}
}
@ -287,6 +356,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
fun update() {
chips = activity.result.toChipList()
notifyDataSetChanged()
searchAdapter.updateFilterTextViewDrawable()
}
override fun getItemCount(): Int = chips.size

View file

@ -1,11 +1,15 @@
package ani.dantotsu.media
import android.animation.ObjectAnimator
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
import android.view.ViewGroup
import android.view.animation.AccelerateDecelerateInterpolator
import android.view.animation.AnimationUtils
import android.widget.ArrayAdapter
import android.widget.PopupMenu
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@ -17,6 +21,9 @@ import ani.dantotsu.connections.anilist.Anilist
import ani.dantotsu.databinding.BottomSheetSearchFilterBinding
import ani.dantotsu.databinding.ItemChipBinding
import com.google.android.material.chip.Chip
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.util.Calendar
class SearchFilterBottomDialog : BottomSheetDialogFragment() {
@ -38,6 +45,54 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
private var exGenres = mutableListOf<String>()
private var selectedTags = 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?) {
@ -47,14 +102,149 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
exGenres = activity.result.excludedGenres ?: mutableListOf()
selectedTags = activity.result.tags ?: 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 {
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 }
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 }
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
tags = selectedTags
excludedGenres = exGenres
@ -67,15 +257,22 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
binding.searchFilterCancel.setOnClickListener {
dismiss()
}
binding.searchSortBy.setText(activity.result.sort?.let {
resources.getStringArray(R.array.sort_by)[Anilist.sortBy.indexOf(it)]
})
binding.searchSortBy.setAdapter(
val format = if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus
binding.searchStatus.setText(activity.result.status?.replace("_", " "))
binding.searchStatus.setAdapter(
ArrayAdapter(
binding.root.context,
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(
binding.root.context,
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 {
binding.searchSeason.setText(activity.result.season)
binding.searchSeason.setAdapter(
@ -98,16 +309,6 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
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 ->

View file

@ -1084,35 +1084,40 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
val incognito: Boolean = PrefManager.getVal(PrefName.Incognito)
if ((isOnline(context) && !offline) && Discord.token != null && !incognito) {
lifecycleScope.launch {
val presence = RPC.createPresence(RPC.Companion.RPCData(
applicationId = Discord.application_Id,
type = RPC.Type.WATCHING,
activityName = media.userPreferredName,
details = ep.title?.takeIf { it.isNotEmpty() } ?: getString(
R.string.episode_num,
ep.number
),
state = "Episode : ${ep.number}/${media.anime?.totalEpisodes ?: "??"}",
largeImage = media.cover?.let {
RPC.Link(
media.userPreferredName,
it
)
},
smallImage = RPC.Link(
"Dantotsu",
Discord.small_Image
),
buttons = mutableListOf(
val discordMode = PrefManager.getCustomVal("discord_mode", "dantotsu")
val buttons = when (discordMode) {
"nothing" -> mutableListOf(
RPC.Link(getString(R.string.view_anime), media.shareLink ?: ""),
RPC.Link(
"Stream on Dantotsu",
getString(R.string.github)
)
"dantotsu" -> mutableListOf(
RPC.Link(getString(R.string.view_anime), media.shareLink ?: ""),
RPC.Link("Watch on Dantotsu", getString(R.string.dantotsu))
)
"anilist" -> {
val userId = PrefManager.getVal<String>(PrefName.AnilistUserId)
val anilistLink = "https://anilist.co/user/$userId/"
mutableListOf(
RPC.Link(getString(R.string.view_anime), media.shareLink ?: ""),
RPC.Link("View My AniList", anilistLink)
)
}
else -> mutableListOf()
}
val presence = RPC.createPresence(
RPC.Companion.RPCData(
applicationId = Discord.application_Id,
type = RPC.Type.WATCHING,
activityName = media.userPreferredName,
details = ep.title?.takeIf { it.isNotEmpty() } ?: getString(
R.string.episode_num,
ep.number
),
state = "Episode : ${ep.number}/${media.anime?.totalEpisodes ?: "??"}",
largeImage = media.cover?.let { RPC.Link(media.userPreferredName, it) },
smallImage = RPC.Link("Dantotsu", Discord.small_Image),
buttons = buttons
)
)
)
val intent = Intent(context, DiscordService::class.java).apply {
putExtra("presence", presence)
}
@ -1120,7 +1125,6 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
startService(intent)
}
}
updateProgress()
}
}

View file

@ -362,15 +362,11 @@ class MangaReaderActivity : AppCompatActivity() {
currentChapterIndex = chaptersArr.indexOf(chap.number)
binding.mangaReaderChapterSelect.setSelection(currentChapterIndex)
if (defaultSettings.direction == RIGHT_TO_LEFT || defaultSettings.direction == BOTTOM_TO_TOP) {
binding.mangaReaderNextChap.text =
chaptersTitleArr.getOrNull(currentChapterIndex - 1) ?: ""
binding.mangaReaderPrevChap.text =
chaptersTitleArr.getOrNull(currentChapterIndex + 1) ?: ""
binding.mangaReaderNextChap.text = chaptersTitleArr.getOrNull(currentChapterIndex - 1) ?: ""
binding.mangaReaderPrevChap.text = chaptersTitleArr.getOrNull(currentChapterIndex + 1) ?: ""
} else {
binding.mangaReaderNextChap.text =
chaptersTitleArr.getOrNull(currentChapterIndex + 1) ?: ""
binding.mangaReaderPrevChap.text =
chaptersTitleArr.getOrNull(currentChapterIndex - 1) ?: ""
binding.mangaReaderNextChap.text = chaptersTitleArr.getOrNull(currentChapterIndex + 1) ?: ""
binding.mangaReaderPrevChap.text = chaptersTitleArr.getOrNull(currentChapterIndex - 1) ?: ""
}
applySettings()
val context = this
@ -378,6 +374,25 @@ class MangaReaderActivity : AppCompatActivity() {
val incognito: Boolean = PrefManager.getVal(PrefName.Incognito)
if ((isOnline(context) && !offline) && Discord.token != null && !incognito) {
lifecycleScope.launch {
val discordMode = PrefManager.getCustomVal("discord_mode", "dantotsu")
val buttons = when (discordMode) {
"nothing" -> mutableListOf(
RPC.Link(getString(R.string.view_manga), media.shareLink ?: ""),
)
"dantotsu" -> mutableListOf(
RPC.Link(getString(R.string.view_manga), media.shareLink ?: ""),
RPC.Link("Read on Dantotsu", getString(R.string.dantotsu))
)
"anilist" -> {
val userId = PrefManager.getVal<String>(PrefName.AnilistUserId)
val anilistLink = "https://anilist.co/user/$userId/"
mutableListOf(
RPC.Link(getString(R.string.view_manga), media.shareLink ?: ""),
RPC.Link("View My AniList", anilistLink)
)
}
else -> mutableListOf()
}
val presence = RPC.createPresence(
RPC.Companion.RPCData(
applicationId = Discord.application_Id,
@ -386,20 +401,9 @@ class MangaReaderActivity : AppCompatActivity() {
details = chap.title?.takeIf { it.isNotEmpty() }
?: getString(R.string.chapter_num, chap.number),
state = "${chap.number}/${media.manga?.totalChapters ?: "??"}",
largeImage = media.cover?.let { cover ->
RPC.Link(media.userPreferredName, cover)
},
smallImage = RPC.Link(
"Dantotsu",
Discord.small_Image
),
buttons = mutableListOf(
RPC.Link(getString(R.string.view_manga), media.shareLink ?: ""),
RPC.Link(
"Stream on Dantotsu",
getString(R.string.github)
)
)
largeImage = media.cover?.let { cover -> RPC.Link(media.userPreferredName, cover) },
smallImage = RPC.Link("Dantotsu", Discord.small_Image),
buttons = buttons
)
)
val intent = Intent(context, DiscordService::class.java).apply {

View file

@ -154,22 +154,23 @@ class ProfileFragment : Fragment() {
private fun setFavPeople() {
if (favStaff.isEmpty()) {
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()) {
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(

View file

@ -0,0 +1,60 @@
package ani.dantotsu.settings
import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.RadioButton
import android.widget.RadioGroup
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import ani.dantotsu.BottomSheetDialogFragment
import ani.dantotsu.R
import ani.dantotsu.connections.anilist.Anilist
import ani.dantotsu.databinding.BottomSheetDiscordRpcBinding
import ani.dantotsu.profile.activity.UsersAdapter
import ani.dantotsu.settings.saving.PrefManager
import ani.dantotsu.settings.saving.PrefName
import com.google.android.material.bottomsheet.BottomSheetDialog
class DiscordDialogFragment: BottomSheetDialogFragment() {
private var _binding: BottomSheetDiscordRpcBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
_binding = BottomSheetDiscordRpcBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
when (PrefManager.getCustomVal("discord_mode", "dantotsu")) {
"nothing" -> binding.radioNothing.isChecked= true
"dantotsu" -> binding.radioDantotsu.isChecked = true
"anilist" -> binding.radioAnilist.isChecked = true
else -> binding.radioAnilist.isChecked = true
}
binding.anilistLinkPreview.text = getString(R.string.anilist_link, PrefManager.getVal<String>(PrefName.AnilistUserName))
binding.radioGroup.setOnCheckedChangeListener { _, checkedId ->
val mode = when (checkedId) {
binding.radioNothing.id -> "nothing"
binding.radioDantotsu.id -> "dantotsu"
binding.radioAnilist.id -> "anilist"
else -> "dantotsu"
}
PrefManager.setCustomVal("discord_mode", mode)
}
}
override fun onDestroy() {
_binding = null
super.onDestroy()
}
}

View file

@ -19,12 +19,15 @@ import android.view.ViewGroup
import android.view.animation.AnimationUtils
import android.view.inputmethod.EditorInfo
import android.widget.ArrayAdapter
import android.widget.RadioButton
import android.widget.RadioGroup
import android.widget.TextView
import androidx.activity.OnBackPressedCallback
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.OptIn
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import android.view.HapticFeedbackConstants
import androidx.core.view.updateLayoutParams
import androidx.documentfile.provider.DocumentFile
import androidx.lifecycle.lifecycleScope
@ -79,6 +82,7 @@ import ani.dantotsu.statusBarHeight
import ani.dantotsu.themes.ThemeManager
import ani.dantotsu.toast
import ani.dantotsu.util.Logger
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.textfield.TextInputEditText
import eltos.simpledialogfragment.SimpleDialog
import eltos.simpledialogfragment.SimpleDialog.OnDialogResultListener.BUTTON_POSITIVE
@ -259,18 +263,18 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
reload()
}
imageSwitcher.visibility = View.VISIBLE
settingsImageSwitcher.visibility = View.VISIBLE
var initialStatus = when (PrefManager.getVal<String>(PrefName.DiscordStatus)) {
"online" -> R.drawable.discord_status_online
"idle" -> R.drawable.discord_status_idle
"dnd" -> R.drawable.discord_status_dnd
else -> R.drawable.discord_status_online
}
imageSwitcher.setImageResource(initialStatus)
settingsImageSwitcher.setImageResource(initialStatus)
val zoomInAnimation =
AnimationUtils.loadAnimation(this@SettingsActivity, R.anim.bounce_zoom)
imageSwitcher.setOnClickListener {
settingsImageSwitcher.setOnClickListener {
var status = "online"
initialStatus = when (initialStatus) {
R.drawable.discord_status_online -> {
@ -292,11 +296,16 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
}
PrefManager.setVal(PrefName.DiscordStatus, status)
imageSwitcher.setImageResource(initialStatus)
imageSwitcher.startAnimation(zoomInAnimation)
settingsImageSwitcher.setImageResource(initialStatus)
settingsImageSwitcher.startAnimation(zoomInAnimation)
}
settingsImageSwitcher.setOnLongClickListener {
it.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
DiscordDialogFragment().show(supportFragmentManager, "dialog")
true
}
} else {
imageSwitcher.visibility = View.GONE
settingsImageSwitcher.visibility = View.GONE
settingsDiscordAvatar.setImageResource(R.drawable.ic_round_person_24)
settingsDiscordUsername.visibility = View.GONE
settingsDiscordLogin.setText(R.string.login)

View 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>

View 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>

View file

@ -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>

View 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>

View 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,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>

View 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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View 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>

View 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>

View file

@ -749,7 +749,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:checked="false"
android:drawableStart="@drawable/ic_round_early_bird_special"
android:drawableStart="@drawable/ic_round_assist_walker_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"

View file

@ -1318,7 +1318,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:checked="false"
android:drawableStart="@drawable/ic_round_early_bird_special"
android:drawableStart="@drawable/ic_round_assist_walker_24"
android:drawablePadding="16dp"
android:elegantTextHeight="true"
android:fontFamily="@font/poppins_bold"

View file

@ -213,11 +213,10 @@
</LinearLayout>
<ImageView
android:id="@+id/imageSwitcher"
android:id="@+id/settingsImageSwitcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/discord_status_idle"
android:onClick="onImageClicked"
android:padding="16dp" />
<com.google.android.material.card.MaterialCardView

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bottom_sheet_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="32dp"
android:layout_height="4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="14dp"
app:cardBackgroundColor="?attr/colorPrimary"
app:cardCornerRadius="2dp"
app:cardElevation="0dp" />
<TextView
android:id="@+id/bottomSheetCustomTitle"
android:layout_width="match_parent"
android:layout_height="48dp"
android:fontFamily="@font/poppins"
android:gravity="bottom|center_horizontal"
android:text="@string/discord_rich_presence"
android:textAlignment="center"
android:textSize="20sp"
android:textStyle="bold" />
<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<RadioButton
android:id="@+id/radio_nothing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/discord_nothing_button" />
<RadioButton
android:id="@+id/radio_dantotsu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/discord_dantotsu_button" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:id="@+id/dantotsuCard"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center"
android:padding="8dp"
app:boxStrokeColor="@color/text_input_layout_stroke_color"
app:cardBackgroundColor="@color/nav_bg"
app:cardCornerRadius="16dp"
app:contentPadding="4dp"
app:contentPaddingLeft="8dp"
app:contentPaddingRight="8dp"
tools:ignore="ContentDescription,TextContrastCheck">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawablePadding="4dp"
android:fontFamily="@font/poppins_bold"
android:text="@string/stream_on_dantotsu"
android:textColor="?attr/colorPrimary"
app:drawableTint="?attr/colorPrimary" />
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:fontFamily="@font/poppins_bold"
android:text="@string/dantotsu"
android:textColor="?attr/colorPrimary"
app:drawableTint="?attr/colorPrimary" />
</LinearLayout>
<RadioButton
android:id="@+id/radio_anilist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/discord_anilist_button" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:id="@+id/anilistCard"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center"
android:padding="8dp"
app:boxStrokeColor="@color/text_input_layout_stroke_color"
app:cardBackgroundColor="@color/nav_bg"
app:cardCornerRadius="16dp"
app:contentPadding="4dp"
app:contentPaddingLeft="8dp"
app:contentPaddingRight="8dp"
tools:ignore="ContentDescription,TextContrastCheck">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawablePadding="4dp"
android:fontFamily="@font/poppins_bold"
android:text="@string/view_my_anilist"
android:textColor="?attr/colorPrimary"
app:drawableTint="?attr/colorPrimary" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/anilistLinkPreview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:fontFamily="@font/poppins_bold"
android:text="@string/anilist_link"
android:textColor="?attr/colorPrimary"
app:drawableTint="?attr/colorPrimary" />
</LinearLayout>
</RadioGroup>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -1,288 +1,382 @@
<?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:tools="http://schemas.android.com/tools"
android:background="@drawable/bottom_sheet_background"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
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
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/bottomSheerCustomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
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"
<Button
android:id="@+id/searchFilterCancel"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_margin="8dp"
android:baselineAligned="false"
android:orientation="horizontal">
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" />
<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/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"
<Button
android:id="@+id/searchFilterApply"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="56dp"
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/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>
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>
</androidx.core.widget.NestedScrollView>
</FrameLayout>

View file

@ -21,7 +21,7 @@
android:layout_height="48dp"
android:fontFamily="@font/poppins"
android:gravity="bottom|center_horizontal"
android:text="Liked By"
android:text="@string/liked_by"
android:textSize="20sp"
android:textStyle="bold" />

View file

@ -150,6 +150,7 @@
tools:ignore="ContentDescription,TextContrastCheck">
<TextView
android:id="@+id/filterTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View 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>

View 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>

View file

@ -9,10 +9,14 @@
<string name="login">Login</string>
<string name="logout">Logout</string>
<string name="dantotsu" translatable="false">https://dantotsu.app/</string>
<string name="discord" translatable="false">https://discord.gg/4HPZ5nAWwM</string>
<string name="github" translatable="false">https://github.com/rebelonion/Dantotsu</string>
<string name="telegram" translatable="false" tools:ignore="Typos">https://t.me/+gzBCQExtLQo1YTNh </string>
<string name="coffee" translatable="false">https://www.buymeacoffee.com/rebelonion</string>
<string name="anilist_link">https://anilist.co/user/%1$s/</string>
<string name="discord_link">https://discord.com/users/%1$s/</string>
<string name="home">Home</string>
<string name="anime">Anime</string>
@ -421,6 +425,13 @@
<string name="install_step">Step: %1$s</string>
<string name="review">Review</string>
<string name="discord_nothing_button">Display only the first button</string>
<string name="discord_dantotsu_button">Display dantotsu in the second button</string>
<string name="discord_anilist_button">Display your AniList profile instead</string>
<string name="discord_rich_presence">Discord Rich Presence</string>
<string name="stream_on_dantotsu">Stream on Dantotsu</string>
<string name="view_my_anilist">View My AniList</string>
<string name="jobless_message">DAMN! YOU TRULY ARE JOBLESS\nYOU REACHED THE END</string>
<string name="file_manager_not_found">Couldn\'t find any File Manager to open SD card</string>
<string name="error_loading_data">Error loading data %1$s</string>
@ -495,6 +506,7 @@
<item>Score</item>
<item>Popular</item>
<item>Trending</item>
<item>New Releases</item>
<item>A-Z</item>
<item>Z-A</item>
<item>Pure pain</item>
@ -650,7 +662,10 @@
<string name="chapter_singular">Chapter</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_country">"Country : %1$s"</string>
<string name="filter_sort">"Sort : %1$s"</string>
<string name="filter_exclude">"Not %1$s"</string>
<string name="search_by_image">Search by Image</string>
@ -848,5 +863,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
<string name="top_rated">Top rated</string>
<string name="most_favourite">Most Favourite</string>
<string name="trending_manhwa">Trending Manhwa</string>
<string name="liked_by">Liked By</string>
<string name="adult_only_content">Adult only content</string>
</resources>