forked from recloudstream/cloudstream
recommended
This commit is contained in:
parent
aae5cbe667
commit
81a3825217
17 changed files with 401 additions and 216 deletions
|
@ -91,8 +91,8 @@ dependencies {
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||||
implementation 'com.google.android.material:material:1.5.0'
|
implementation 'com.google.android.material:material:1.5.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.0-rc01'
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0-alpha01'
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.4.0-rc01'
|
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0-alpha01'
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
|
@ -105,7 +105,7 @@ dependencies {
|
||||||
|
|
||||||
implementation "com.google.android.material:material:1.5.0"
|
implementation "com.google.android.material:material:1.5.0"
|
||||||
|
|
||||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
||||||
|
|
||||||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||||
kapt 'com.github.bumptech.glide:compiler:4.12.0'
|
kapt 'com.github.bumptech.glide:compiler:4.12.0'
|
||||||
|
@ -157,7 +157,7 @@ dependencies {
|
||||||
// API because cba maintaining it myself
|
// API because cba maintaining it myself
|
||||||
implementation "com.uwetrottmann.tmdb2:tmdb-java:2.6.0"
|
implementation "com.uwetrottmann.tmdb2:tmdb-java:2.6.0"
|
||||||
|
|
||||||
|
implementation 'com.github.discord:OverlappingPanels:0.1.3'
|
||||||
// debugImplementation because LeakCanary should only run in debug builds.
|
// debugImplementation because LeakCanary should only run in debug builds.
|
||||||
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
|
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.hideKeyboard
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.requestRW
|
import com.lagradost.cloudstream3.utils.UIHelper.requestRW
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_result.*
|
import kotlinx.android.synthetic.main.fragment_result_swipe.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import kotlin.concurrent.thread
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,23 @@ class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
|
||||||
?: throw RuntimeException("Unable to get id from '$url'")
|
?: throw RuntimeException("Unable to get id from '$url'")
|
||||||
else dataId
|
else dataId
|
||||||
|
|
||||||
|
val recommendations =
|
||||||
|
document.select("div.film_list-wrap > div.flw-item")?.mapNotNull { element ->
|
||||||
|
val titleHeader =
|
||||||
|
element.select("div.film-detail > .film-name > a") ?: return@mapNotNull null
|
||||||
|
val recUrl = fixUrlNull(titleHeader.attr("href")) ?: return@mapNotNull null
|
||||||
|
val recTitle = titleHeader.text() ?: return@mapNotNull null
|
||||||
|
val poster = element.select("div.film-poster > img")?.attr("data-src")
|
||||||
|
MovieSearchResponse(
|
||||||
|
recTitle,
|
||||||
|
recUrl,
|
||||||
|
this.name,
|
||||||
|
if (recUrl.contains("/movie/")) TvType.Movie else TvType.TvSeries,
|
||||||
|
poster,
|
||||||
|
year = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (isMovie) {
|
if (isMovie) {
|
||||||
// Movies
|
// Movies
|
||||||
val episodesUrl = "$mainUrl/ajax/movie/episodes/$id"
|
val episodesUrl = "$mainUrl/ajax/movie/episodes/$id"
|
||||||
|
@ -139,6 +156,7 @@ class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
|
||||||
this.posterUrl = posterUrl
|
this.posterUrl = posterUrl
|
||||||
this.plot = plot
|
this.plot = plot
|
||||||
setDuration(duration)
|
setDuration(duration)
|
||||||
|
this.recommendations = recommendations
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val seasonsDocument = app.get("$mainUrl/ajax/v2/tv/seasons/$id").document
|
val seasonsDocument = app.get("$mainUrl/ajax/v2/tv/seasons/$id").document
|
||||||
|
@ -183,6 +201,7 @@ class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = plot
|
this.plot = plot
|
||||||
setDuration(duration)
|
setDuration(duration)
|
||||||
|
this.recommendations = recommendations
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,12 +335,15 @@ abstract class AbstractPlayerFragment(
|
||||||
SubtitlesFragment.applyStyleEvent += ::onSubStyleChanged
|
SubtitlesFragment.applyStyleEvent += ::onSubStyleChanged
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
context?.let {
|
||||||
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(
|
||||||
|
it
|
||||||
|
)
|
||||||
val currentPrefSize =
|
val currentPrefSize =
|
||||||
settingsManager.getInt(getString(R.string.video_cache_key), 300)
|
settingsManager.getInt(getString(R.string.video_cache_key), 300)
|
||||||
|
|
||||||
player.cacheSize = currentPrefSize * 1024L * 1024L
|
player.cacheSize = currentPrefSize * 1024L * 1024L
|
||||||
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logError(e)
|
logError(e)
|
||||||
}
|
}
|
||||||
|
|
|
@ -974,8 +974,9 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(activity)
|
|
||||||
context?.let { ctx ->
|
context?.let { ctx ->
|
||||||
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(ctx)
|
||||||
|
|
||||||
navigationBarHeight = ctx.getNavigationBarHeight()
|
navigationBarHeight = ctx.getNavigationBarHeight()
|
||||||
statusBarHeight = ctx.getStatusBarHeight()
|
statusBarHeight = ctx.getStatusBarHeight()
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.content.Intent
|
||||||
import android.content.Intent.*
|
import android.content.Intent.*
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
|
import android.graphics.Rect
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -29,6 +30,8 @@ import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.discord.panels.OverlappingPanelsLayout
|
||||||
|
import com.discord.panels.PanelsChildGestureRegionObserver
|
||||||
import com.google.android.gms.cast.framework.CastButtonFactory
|
import com.google.android.gms.cast.framework.CastButtonFactory
|
||||||
import com.google.android.gms.cast.framework.CastContext
|
import com.google.android.gms.cast.framework.CastContext
|
||||||
import com.google.android.gms.cast.framework.CastState
|
import com.google.android.gms.cast.framework.CastState
|
||||||
|
@ -85,6 +88,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.setImageBlur
|
import com.lagradost.cloudstream3.utils.UIHelper.setImageBlur
|
||||||
import com.lagradost.cloudstream3.utils.VideoDownloadManager.sanitizeFilename
|
import com.lagradost.cloudstream3.utils.VideoDownloadManager.sanitizeFilename
|
||||||
import kotlinx.android.synthetic.main.fragment_result.*
|
import kotlinx.android.synthetic.main.fragment_result.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_result_swipe.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
@ -175,7 +179,7 @@ fun ResultEpisode.getWatchProgress(): Float {
|
||||||
return (getDisplayPosition() / 1000).toFloat() / (duration / 1000).toFloat()
|
return (getDisplayPosition() / 1000).toFloat() / (duration / 1000).toFloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
class ResultFragment : Fragment() {
|
class ResultFragment : Fragment(), PanelsChildGestureRegionObserver.GestureRegionsListener {
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(
|
fun newInstance(
|
||||||
url: String,
|
url: String,
|
||||||
|
@ -375,7 +379,7 @@ class ResultFragment : Fragment() {
|
||||||
): View? {
|
): View? {
|
||||||
viewModel =
|
viewModel =
|
||||||
ViewModelProvider(this)[ResultViewModel::class.java]
|
ViewModelProvider(this)[ResultViewModel::class.java]
|
||||||
return inflater.inflate(R.layout.fragment_result, container, false)
|
return inflater.inflate(R.layout.fragment_result_swipe, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
@ -491,8 +495,18 @@ class ResultFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setRecommendations(rec: List<SearchResponse>?) {
|
private fun setRecommendations(rec: List<SearchResponse>?) {
|
||||||
return
|
val isInvalid = rec.isNullOrEmpty()
|
||||||
result_recommendations?.isGone = rec.isNullOrEmpty()
|
result_recommendations?.isGone = isInvalid
|
||||||
|
result_recommendations_btt?.isGone = isInvalid
|
||||||
|
result_recommendations_btt?.setOnClickListener {
|
||||||
|
if(result_overlapping_panels?.getSelectedPanel()?.ordinal == 1) {
|
||||||
|
result_overlapping_panels?.openEndPanel()
|
||||||
|
} else {
|
||||||
|
result_overlapping_panels?.closePanels()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result_overlapping_panels?.setEndPanelLockState(if (isInvalid) OverlappingPanelsLayout.LockState.CLOSE else OverlappingPanelsLayout.LockState.UNLOCKED)
|
||||||
|
|
||||||
rec?.let { list ->
|
rec?.let { list ->
|
||||||
(result_recommendations?.adapter as SearchAdapter?)?.apply {
|
(result_recommendations?.adapter as SearchAdapter?)?.apply {
|
||||||
cardList = list
|
cardList = list
|
||||||
|
@ -502,8 +516,8 @@ class ResultFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fixGrid() {
|
private fun fixGrid() {
|
||||||
activity?.getSpanCount()?.let { count ->
|
activity?.getSpanCount()?.let { _ ->
|
||||||
result_recommendations?.spanCount = count
|
//result_recommendations?.spanCount = count // this is due to discord not changing size with rotation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,6 +548,9 @@ class ResultFragment : Fragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
fixGrid()
|
fixGrid()
|
||||||
|
result_recommendations?.spanCount = 3
|
||||||
|
result_overlapping_panels?.setStartPanelLockState(OverlappingPanelsLayout.LockState.CLOSE)
|
||||||
|
result_overlapping_panels?.setEndPanelLockState(OverlappingPanelsLayout.LockState.CLOSE)
|
||||||
|
|
||||||
updateUIListener = ::updateUI
|
updateUIListener = ::updateUI
|
||||||
|
|
||||||
|
@ -546,7 +563,7 @@ class ResultFragment : Fragment() {
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
activity?.loadCache()
|
activity?.loadCache()
|
||||||
|
|
||||||
activity?.fixPaddingStatusbar(result_scroll)
|
activity?.fixPaddingStatusbar(result_top_bar)
|
||||||
//activity?.fixPaddingStatusbar(result_barstatus)
|
//activity?.fixPaddingStatusbar(result_barstatus)
|
||||||
|
|
||||||
/* val backParameter = result_back.layoutParams as FrameLayout.LayoutParams
|
/* val backParameter = result_back.layoutParams as FrameLayout.LayoutParams
|
||||||
|
@ -1042,7 +1059,8 @@ class ResultFragment : Fragment() {
|
||||||
max = (viewPos.duration / 1000).toInt()
|
max = (viewPos.duration / 1000).toInt()
|
||||||
progress = (viewPos.position / 1000).toInt()
|
progress = (viewPos.position / 1000).toInt()
|
||||||
}
|
}
|
||||||
result_resume_series_progress_text?.text = getString(R.string.resume_time_left).format((viewPos.duration - viewPos.position) / (60_000))
|
result_resume_series_progress_text?.text =
|
||||||
|
getString(R.string.resume_time_left).format((viewPos.duration - viewPos.position) / (60_000))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1528,4 +1546,8 @@ class ResultFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onGestureRegionsUpdate(gestureRegions: List<Rect>) {
|
||||||
|
result_overlapping_panels?.setChildGestureRegions(gestureRegions)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -410,8 +410,8 @@ class SearchFragment : Fragment() {
|
||||||
search_master_recycler?.adapter = masterAdapter
|
search_master_recycler?.adapter = masterAdapter
|
||||||
search_master_recycler?.layoutManager = GridLayoutManager(context, 1)
|
search_master_recycler?.layoutManager = GridLayoutManager(context, 1)
|
||||||
|
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
val settingsManager = context?.let { PreferenceManager.getDefaultSharedPreferences(it) }
|
||||||
val isAdvancedSearch = settingsManager.getBoolean("advanced_search", true)
|
val isAdvancedSearch = settingsManager?.getBoolean("advanced_search", true) ?: true
|
||||||
|
|
||||||
search_master_recycler?.isVisible = isAdvancedSearch
|
search_master_recycler?.isVisible = isAdvancedSearch
|
||||||
search_autofit_results?.isVisible = !isAdvancedSearch
|
search_autofit_results?.isVisible = !isAdvancedSearch
|
||||||
|
|
|
@ -198,11 +198,11 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
val appThemePreference = findPreference<Preference>(getString(R.string.app_theme_key))!!
|
val appThemePreference = findPreference<Preference>(getString(R.string.app_theme_key))!!
|
||||||
val subPreference = findPreference<Preference>(getString(R.string.subtitle_settings_key))!!
|
val subPreference = findPreference<Preference>(getString(R.string.subtitle_settings_key))!!
|
||||||
val videoCachePreference = findPreference<Preference>(getString(R.string.video_cache_key))!!
|
val videoCachePreference = findPreference<Preference>(getString(R.string.video_cache_key))!!
|
||||||
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||||
|
|
||||||
videoCachePreference.setOnPreferenceClickListener {
|
videoCachePreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.video_cache_size_names)
|
val prefNames = resources.getStringArray(R.array.video_cache_size_names)
|
||||||
val prefValues = resources.getIntArray(R.array.video_cache_size_values)
|
val prefValues = resources.getIntArray(R.array.video_cache_size_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentPrefSize =
|
val currentPrefSize =
|
||||||
settingsManager.getInt(getString(R.string.video_cache_key), 300)
|
settingsManager.getInt(getString(R.string.video_cache_key), 300)
|
||||||
|
@ -255,8 +255,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
subdubPreference.setOnPreferenceClickListener {
|
subdubPreference.setOnPreferenceClickListener {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
activity?.getApiDubstatusSettings()?.let { current ->
|
activity?.getApiDubstatusSettings()?.let { current ->
|
||||||
val dublist = DubStatus.values()
|
val dublist = DubStatus.values()
|
||||||
val names = dublist.map { it.name }
|
val names = dublist.map { it.name }
|
||||||
|
@ -284,8 +282,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
providerLangPreference.setOnPreferenceClickListener {
|
providerLangPreference.setOnPreferenceClickListener {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
activity?.getApiProviderLangSettings()?.let { current ->
|
activity?.getApiProviderLangSettings()?.let { current ->
|
||||||
val allLangs = HashSet<String>()
|
val allLangs = HashSet<String>()
|
||||||
for (api in apis) {
|
for (api in apis) {
|
||||||
|
@ -348,7 +344,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
|
|
||||||
downloadPathPreference.setOnPreferenceClickListener {
|
downloadPathPreference.setOnPreferenceClickListener {
|
||||||
val dirs = getDownloadDirs()
|
val dirs = getDownloadDirs()
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentDir =
|
val currentDir =
|
||||||
settingsManager.getString(getString(R.string.download_path_pref), null) ?: getDownloadDir().toString()
|
settingsManager.getString(getString(R.string.download_path_pref), null) ?: getDownloadDir().toString()
|
||||||
|
@ -376,7 +371,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
preferedMediaTypePreference.setOnPreferenceClickListener {
|
preferedMediaTypePreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.media_type_pref)
|
val prefNames = resources.getStringArray(R.array.media_type_pref)
|
||||||
val prefValues = resources.getIntArray(R.array.media_type_pref_values)
|
val prefValues = resources.getIntArray(R.array.media_type_pref_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentPrefMedia =
|
val currentPrefMedia =
|
||||||
settingsManager.getInt(getString(R.string.prefer_media_type_key), 0)
|
settingsManager.getInt(getString(R.string.prefer_media_type_key), 0)
|
||||||
|
@ -400,7 +394,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
allLayoutPreference.setOnPreferenceClickListener {
|
allLayoutPreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.app_layout)
|
val prefNames = resources.getStringArray(R.array.app_layout)
|
||||||
val prefValues = resources.getIntArray(R.array.app_layout_values)
|
val prefValues = resources.getIntArray(R.array.app_layout_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentLayout =
|
val currentLayout =
|
||||||
settingsManager.getInt(getString(R.string.app_layout_key), -1)
|
settingsManager.getInt(getString(R.string.app_layout_key), -1)
|
||||||
|
@ -425,7 +418,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
colorPrimaryPreference.setOnPreferenceClickListener {
|
colorPrimaryPreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.themes_overlay_names)
|
val prefNames = resources.getStringArray(R.array.themes_overlay_names)
|
||||||
val prefValues = resources.getStringArray(R.array.themes_overlay_names_values)
|
val prefValues = resources.getStringArray(R.array.themes_overlay_names_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentLayout =
|
val currentLayout =
|
||||||
settingsManager.getString(getString(R.string.primary_color_key), prefValues.first())
|
settingsManager.getString(getString(R.string.primary_color_key), prefValues.first())
|
||||||
|
@ -450,7 +442,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
appThemePreference.setOnPreferenceClickListener {
|
appThemePreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.themes_names)
|
val prefNames = resources.getStringArray(R.array.themes_names)
|
||||||
val prefValues = resources.getStringArray(R.array.themes_names_values)
|
val prefValues = resources.getStringArray(R.array.themes_names_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentLayout =
|
val currentLayout =
|
||||||
settingsManager.getString(getString(R.string.app_theme_key), prefValues.first())
|
settingsManager.getString(getString(R.string.app_theme_key), prefValues.first())
|
||||||
|
@ -475,7 +466,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
watchQualityPreference.setOnPreferenceClickListener {
|
watchQualityPreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.quality_pref)
|
val prefNames = resources.getStringArray(R.array.quality_pref)
|
||||||
val prefValues = resources.getIntArray(R.array.quality_pref_values)
|
val prefValues = resources.getIntArray(R.array.quality_pref_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentQuality =
|
val currentQuality =
|
||||||
settingsManager.getInt(
|
settingsManager.getInt(
|
||||||
|
@ -498,7 +488,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
dnsPreference.setOnPreferenceClickListener {
|
dnsPreference.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.dns_pref)
|
val prefNames = resources.getStringArray(R.array.dns_pref)
|
||||||
val prefValues = resources.getIntArray(R.array.dns_pref_values)
|
val prefValues = resources.getIntArray(R.array.dns_pref_values)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
val currentDns =
|
val currentDns =
|
||||||
settingsManager.getInt(getString(R.string.dns_pref), 0)
|
settingsManager.getInt(getString(R.string.dns_pref), 0)
|
||||||
|
@ -516,8 +505,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
beneneCount = settingsManager.getInt(getString(R.string.benene_count), 0)
|
beneneCount = settingsManager.getInt(getString(R.string.benene_count), 0)
|
||||||
|
|
||||||
benenePreference.summary =
|
benenePreference.summary =
|
||||||
|
@ -567,7 +554,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
try {
|
try {
|
||||||
val code = languageCodes[languageIndex]
|
val code = languageCodes[languageIndex]
|
||||||
setLocale(activity, code)
|
setLocale(activity, code)
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(pref.context)
|
|
||||||
settingsManager.edit().putString(getString(R.string.locale_key), code).apply()
|
settingsManager.edit().putString(getString(R.string.locale_key), code).apply()
|
||||||
activity?.recreate()
|
activity?.recreate()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -579,7 +565,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentLocale(): String {
|
private fun getCurrentLocale(): String {
|
||||||
val res = context!!.resources
|
val res = requireContext().resources
|
||||||
// Change locale settings in the app.
|
// Change locale settings in the app.
|
||||||
// val dm = res.displayMetrics
|
// val dm = res.displayMetrics
|
||||||
val conf = res.configuration
|
val conf = res.configuration
|
||||||
|
|
11
app/src/main/res/drawable/baseline_list_alt_24.xml
Normal file
11
app/src/main/res/drawable/baseline_list_alt_24.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:autoMirrored="true">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M19,5v14L5,19L5,5h14m1.1,-2L3.9,3c-0.5,0 -0.9,0.4 -0.9,0.9v16.2c0,0.4 0.4,0.9 0.9,0.9h16.2c0.4,0 0.9,-0.5 0.9,-0.9L21,3.9c0,-0.5 -0.5,-0.9 -0.9,-0.9zM11,7h6v2h-6L11,7zM11,11h6v2h-6v-2zM11,15h6v2h-6zM7,7h2v2L7,9zM7,11h2v2L7,13zM7,15h2v2L7,17z"/>
|
||||||
|
</vector>
|
|
@ -165,6 +165,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<!--
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:background="?attr/primaryGrayBackground"
|
android:background="?attr/primaryGrayBackground"
|
||||||
android:paddingStart="@dimen/result_padding"
|
android:paddingStart="@dimen/result_padding"
|
||||||
|
@ -204,25 +205,6 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:mediaRouteButtonTint="?attr/textColor" />
|
app:mediaRouteButtonTint="?attr/textColor" />
|
||||||
|
|
||||||
<!--
|
|
||||||
<ImageView
|
|
||||||
android:visibility="gone"
|
|
||||||
android:nextFocusUp="@id/result_back"
|
|
||||||
android:nextFocusDown="@id/result_descript"
|
|
||||||
android:nextFocusLeft="@id/result_back"
|
|
||||||
android:nextFocusRight="@id/result_share"
|
|
||||||
|
|
||||||
android:id="@+id/result_add_sync"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:elevation="10dp"
|
|
||||||
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/ic_baseline_add_24"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:contentDescription="@string/add_sync"
|
|
||||||
app:tint="?attr/textColor" />-->
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:nextFocusUp="@id/result_back"
|
android:nextFocusUp="@id/result_back"
|
||||||
|
@ -278,7 +260,7 @@
|
||||||
android:contentDescription="@string/result_open_in_browser"
|
android:contentDescription="@string/result_open_in_browser"
|
||||||
app:tint="?attr/textColor" />
|
app:tint="?attr/textColor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>-->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
@ -477,122 +459,6 @@
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:textColor="?attr/textColor" />
|
android:textColor="?attr/textColor" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:text="MyAnimeList"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:visibility="visible"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:padding="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/ic_baseline_add_24"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:contentDescription="@string/result_share"
|
|
||||||
app:tint="?attr/textColor" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:textSize="17sp"
|
|
||||||
android:textColor="?attr/textColor"
|
|
||||||
android:text="24/30"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<androidx.core.widget.ContentLoadingProgressBar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:progress="50"
|
|
||||||
android:indeterminate="false"
|
|
||||||
android:progressBackgroundTint="?attr/colorPrimary"
|
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
|
||||||
android:max="100"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:textSize="17sp"
|
|
||||||
android:textColor="?attr/textColor"
|
|
||||||
android:text="Rated:"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:text="7/10"
|
|
||||||
android:minWidth="0dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
style="@style/BlackButton" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:textSize="17sp"
|
|
||||||
android:textColor="?attr/textColor"
|
|
||||||
android:text="Status:"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:text="Watching"
|
|
||||||
android:minWidth="0dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
style="@style/BlackButton" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:visibility="gone"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/home_parent_item_title"
|
|
||||||
style="@style/WatchHeaderText"
|
|
||||||
tools:text="Recommended" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
app:tint="?attr/textColor"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:src="@drawable/ic_baseline_arrow_forward_24"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:contentDescription="@string/home_more_info" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.lagradost.cloudstream3.widget.FlowLayout
|
<com.lagradost.cloudstream3.widget.FlowLayout
|
||||||
android:id="@+id/result_tag"
|
android:id="@+id/result_tag"
|
||||||
|
@ -794,18 +660,6 @@
|
||||||
</com.google.android.material.tabs.TabItem>
|
</com.google.android.material.tabs.TabItem>
|
||||||
</com.google.android.material.tabs.TabLayout>-->
|
</com.google.android.material.tabs.TabLayout>-->
|
||||||
|
|
||||||
<com.lagradost.cloudstream3.ui.AutofitRecyclerView
|
|
||||||
android:visibility="gone"
|
|
||||||
android:descendantFocusability="afterDescendants"
|
|
||||||
|
|
||||||
android:background="?attr/primaryBlackBackground"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
app:spanCount="3"
|
|
||||||
android:id="@+id/result_recommendations"
|
|
||||||
tools:listitem="@layout/search_result_grid"
|
|
||||||
android:orientation="vertical" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/result_episodes_tab"
|
android:id="@+id/result_episodes_tab"
|
||||||
|
@ -926,30 +780,6 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
android:id="@+id/result_bookmark_fab"
|
|
||||||
app:icon="@drawable/ic_baseline_bookmark_24"
|
|
||||||
style="@style/ExtendedFloatingActionButton"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
app:customCastBackgroundColor="?attr/primaryBlackBackground"
|
|
||||||
app:castControlButtons="@array/cast_mini_controller_control_buttons"
|
|
||||||
android:id="@+id/cast_mini_controller"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone"
|
|
||||||
class="com.lagradost.cloudstream3.ui.MyMiniControllerFragment"
|
|
||||||
tools:ignore="FragmentTagUsage" />
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
313
app/src/main/res/layout/fragment_result_swipe.xml
Normal file
313
app/src/main/res/layout/fragment_result_swipe.xml
Normal file
|
@ -0,0 +1,313 @@
|
||||||
|
<LinearLayout 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:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/result_top_bar"
|
||||||
|
android:background="?attr/primaryGrayBackground"
|
||||||
|
android:paddingStart="@dimen/result_padding"
|
||||||
|
android:paddingEnd="@dimen/result_padding"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:nextFocusDown="@id/result_bookmark_button"
|
||||||
|
android:nextFocusRight="@id/result_share"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
|
||||||
|
android:id="@+id/result_back"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center_vertical|start"
|
||||||
|
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||||
|
android:contentDescription="@string/go_back"
|
||||||
|
app:tint="?attr/white" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:gravity="end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:id="@+id/media_route_button_holder"
|
||||||
|
android:layout_gravity="center_vertical|end">
|
||||||
|
|
||||||
|
<androidx.mediarouter.app.MediaRouteButton
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:id="@+id/media_route_button"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:mediaRouteTypes="user"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:mediaRouteButtonTint="?attr/textColor" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:nextFocusUp="@id/result_back"
|
||||||
|
android:nextFocusDown="@id/result_descript"
|
||||||
|
android:nextFocusLeft="@id/result_add_sync"
|
||||||
|
android:nextFocusRight="@id/result_openinbrower"
|
||||||
|
|
||||||
|
android:id="@+id/result_share"
|
||||||
|
android:layout_width="25dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_outline_share_24"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:contentDescription="@string/result_share"
|
||||||
|
app:tint="?attr/textColor" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:nextFocusUp="@id/result_back"
|
||||||
|
android:nextFocusDown="@id/result_descript"
|
||||||
|
android:nextFocusLeft="@id/result_share"
|
||||||
|
android:nextFocusRight="@id/result_search"
|
||||||
|
|
||||||
|
android:id="@+id/result_openinbrower"
|
||||||
|
android:layout_width="25dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_baseline_public_24"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:contentDescription="@string/result_open_in_browser"
|
||||||
|
app:tint="?attr/textColor" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:nextFocusUp="@id/result_back"
|
||||||
|
android:nextFocusDown="@id/result_descript"
|
||||||
|
android:nextFocusLeft="@id/result_openinbrower"
|
||||||
|
android:nextFocusRight="@id/result_recommendations_btt"
|
||||||
|
|
||||||
|
android:id="@+id/result_search"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/search_icon"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:contentDescription="@string/result_open_in_browser"
|
||||||
|
app:tint="?attr/textColor" />
|
||||||
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
|
android:nextFocusUp="@id/result_back"
|
||||||
|
android:nextFocusDown="@id/result_descript"
|
||||||
|
android:nextFocusLeft="@id/result_search"
|
||||||
|
android:nextFocusRight="@id/result_bookmark_button"
|
||||||
|
|
||||||
|
android:id="@+id/result_recommendations_btt"
|
||||||
|
android:layout_width="25dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/baseline_list_alt_24"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:contentDescription="@string/result_open_in_browser"
|
||||||
|
app:tint="?attr/textColor" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.discord.panels.OverlappingPanelsLayout
|
||||||
|
android:id="@+id/result_overlapping_panels"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<!-- Set layout_gravity on the start panel to "start" -->
|
||||||
|
<FrameLayout
|
||||||
|
android:visibility="gone"
|
||||||
|
android:id="@+id/start_panel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="start">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:text="MyAnimeList"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:visibility="visible"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_baseline_add_24"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:contentDescription="@string/result_share"
|
||||||
|
app:tint="?attr/textColor" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:textColor="?attr/textColor"
|
||||||
|
android:text="24/30"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<androidx.core.widget.ContentLoadingProgressBar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:progress="50"
|
||||||
|
android:indeterminate="false"
|
||||||
|
android:progressBackgroundTint="?attr/colorPrimary"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:max="100"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:textColor="?attr/textColor"
|
||||||
|
android:text="Rated:"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:text="7/10"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
style="@style/BlackButton" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:textColor="?attr/textColor"
|
||||||
|
android:text="Status:"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:text="Watching"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
style="@style/BlackButton" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:visibility="gone"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/home_parent_item_title"
|
||||||
|
style="@style/WatchHeaderText"
|
||||||
|
tools:text="Recommended" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
app:tint="?attr/textColor"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:src="@drawable/ic_baseline_arrow_forward_24"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:contentDescription="@string/home_more_info" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/center_panel"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<include layout="@layout/fragment_result" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<!-- Set layout_gravity on the end panel to "end" -->
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/end_panel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="end">
|
||||||
|
|
||||||
|
<com.lagradost.cloudstream3.ui.AutofitRecyclerView
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
|
|
||||||
|
android:background="?attr/primaryBlackBackground"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:spanCount="3"
|
||||||
|
android:id="@+id/result_recommendations"
|
||||||
|
tools:listitem="@layout/search_result_grid"
|
||||||
|
android:orientation="vertical" />
|
||||||
|
</FrameLayout>
|
||||||
|
</com.discord.panels.OverlappingPanelsLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:id="@+id/result_bookmark_fab"
|
||||||
|
app:icon="@drawable/ic_baseline_bookmark_24"
|
||||||
|
style="@style/ExtendedFloatingActionButton"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
app:customCastBackgroundColor="?attr/primaryBlackBackground"
|
||||||
|
app:castControlButtons="@array/cast_mini_controller_control_buttons"
|
||||||
|
android:id="@+id/cast_mini_controller"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
class="com.lagradost.cloudstream3.ui.MyMiniControllerFragment"
|
||||||
|
tools:ignore="FragmentTagUsage" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
|
@ -275,7 +275,7 @@
|
||||||
|
|
||||||
<string name="subtitles_example_text">نصٌّ حكيمٌ لهُ سِرٌّ قاطِعٌ وَذُو شَأنٍ عَظيمٍ مكتوبٌ على ثوبٍ أخضرَ ومُغلفٌ بجلدٍ أزرق</string>
|
<string name="subtitles_example_text">نصٌّ حكيمٌ لهُ سِرٌّ قاطِعٌ وَذُو شَأنٍ عَظيمٍ مكتوبٌ على ثوبٍ أخضرَ ومُغلفٌ بجلدٍ أزرق</string>
|
||||||
|
|
||||||
<string name="tab_recommended">موصى به</string>
|
<string name="recommended">موصى به</string>
|
||||||
<string name="player_load_subtitles">تحميل من ملف</string>
|
<string name="player_load_subtitles">تحميل من ملف</string>
|
||||||
<string name="downloaded_file">الملف الذي تم تنزيله</string>
|
<string name="downloaded_file">الملف الذي تم تنزيله</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -335,7 +335,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="subtitles_example_text">The quick brown fox jumps over the lazy dog</string>
|
<string name="subtitles_example_text">The quick brown fox jumps over the lazy dog</string>
|
||||||
|
|
||||||
<string name="tab_recommended">Consiglaito</string>
|
<string name="recommended">Consiglaito</string>
|
||||||
<string name="player_loaded_subtitles" formatted="true">Caricato %s</string>
|
<string name="player_loaded_subtitles" formatted="true">Caricato %s</string>
|
||||||
<string name="player_load_subtitles">Carica da file</string>
|
<string name="player_load_subtitles">Carica da file</string>
|
||||||
<string name="downloaded_file">Downloaded file</string>
|
<string name="downloaded_file">Downloaded file</string>
|
||||||
|
|
|
@ -271,7 +271,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="subtitles_example_text">Xem trước mẫu phụ đề</string>
|
<string name="subtitles_example_text">Xem trước mẫu phụ đề</string>
|
||||||
|
|
||||||
<string name="tab_recommended">Được đề xuất</string>
|
<string name="recommended">Được đề xuất</string>
|
||||||
<string name="player_loaded_subtitles" formatted="true">Đã tải %s</string>
|
<string name="player_loaded_subtitles" formatted="true">Đã tải %s</string>
|
||||||
<string name="player_load_subtitles">Chọn tệp</string>
|
<string name="player_load_subtitles">Chọn tệp</string>
|
||||||
<string name="downloaded_file">Tệp đã tải</string>
|
<string name="downloaded_file">Tệp đã tải</string>
|
||||||
|
|
|
@ -380,7 +380,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="subtitles_example_text">The quick brown fox jumps over the lazy dog</string>
|
<string name="subtitles_example_text">The quick brown fox jumps over the lazy dog</string>
|
||||||
|
|
||||||
<string name="tab_recommended">Recommended</string>
|
<string name="recommended">Recommended</string>
|
||||||
<string name="player_loaded_subtitles" formatted="true">Loaded %s</string>
|
<string name="player_loaded_subtitles" formatted="true">Loaded %s</string>
|
||||||
<string name="player_load_subtitles">Load from file</string>
|
<string name="player_load_subtitles">Load from file</string>
|
||||||
<string name="downloaded_file">Downloaded file</string>
|
<string name="downloaded_file">Downloaded file</string>
|
||||||
|
|
|
@ -6,7 +6,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:4.1.3"
|
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Fri Apr 30 17:11:15 CEST 2021
|
#Fri Apr 30 17:11:15 CEST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
Loading…
Reference in a new issue