updated resultspage UI (dont update if you are on a tv)

This commit is contained in:
LagradOst 2021-12-10 01:20:24 +01:00
parent fd7e7ae3e0
commit ea9ef8d293
6 changed files with 469 additions and 418 deletions

View file

@ -4,33 +4,24 @@ import android.util.Log
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.extractors.DoodLaExtractor
import com.lagradost.cloudstream3.extractors.FEmbed
import com.lagradost.cloudstream3.extractors.MixDrop
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.mapper
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup
class PinoyMoviePedia : MainAPI() {
override val name: String
get() = "Pinoy Moviepedia"
override val name = "Pinoy Moviepedia"
override val mainUrl = "https://pinoymoviepedia.ru"
override val lang = "tl"
override val mainUrl: String
get() = "https://pinoymoviepedia.ru"
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
override val supportedTypes: Set<TvType>
get() = setOf(TvType.Movie, TvType.TvSeries)
override val hasDownloadSupport: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val hasQuickSearch: Boolean
get() = false
override val hasDownloadSupport = false
override val hasMainPage = true
override val hasQuickSearch = false
private data class JsonVoeLinks(
@JsonProperty("hls") val url: String?,

View file

@ -164,9 +164,9 @@ class EpisodeAdapter(
episodeRating?.text = ""
}
if (card.descript != null) {
if (card.description != null) {
episodeDescript?.visibility = View.VISIBLE
episodeDescript?.text = card.descript
episodeDescript?.text = card.description
} else {
episodeDescript?.visibility = View.GONE
}
@ -216,7 +216,7 @@ class EpisodeAdapter(
card.id,
0,
card.rating,
card.descript,
card.description,
System.currentTimeMillis(),
)
) {

View file

@ -9,7 +9,6 @@ import android.content.Intent
import android.content.Intent.*
import android.net.Uri
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
@ -17,9 +16,8 @@ import android.view.View.VISIBLE
import android.view.ViewGroup
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.FileProvider
import androidx.core.text.color
import androidx.core.view.isGone
import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView
import androidx.fragment.app.Fragment
@ -61,7 +59,6 @@ import com.lagradost.cloudstream3.utils.DataStoreHelper.getViewPos
import com.lagradost.cloudstream3.utils.UIHelper.checkWrite
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
import com.lagradost.cloudstream3.utils.UIHelper.getStatusBarHeight
import com.lagradost.cloudstream3.utils.UIHelper.hideKeyboard
import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
@ -69,6 +66,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIcons
import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIconsAndNoStringRes
import com.lagradost.cloudstream3.utils.UIHelper.requestRW
import com.lagradost.cloudstream3.utils.UIHelper.setImage
import com.lagradost.cloudstream3.utils.UIHelper.setImageBlur
import com.lagradost.cloudstream3.utils.VideoDownloadManager.sanitizeFilename
import kotlinx.android.synthetic.main.fragment_result.*
import kotlinx.coroutines.Dispatchers
@ -76,7 +74,7 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.withContext
import java.io.File
const val MAX_SYNO_LENGH = 300
const val MAX_SYNO_LENGH = 1000
const val START_ACTION_NORMAL = 0
const val START_ACTION_RESUME_LATEST = 1
@ -96,7 +94,7 @@ data class ResultEpisode(
val position: Long, // time in MS
val duration: Long, // duration in MS
val rating: Int?,
val descript: String?,
val description: String?,
val isFiller: Boolean?,
)
@ -179,8 +177,8 @@ class ResultFragment : Fragment() {
container: ViewGroup?,
savedInstanceState: Bundle?,
): View? {
// viewModel =
// ViewModelProvider(activity ?: this).get(ResultViewModel::class.java)
// viewModel =
// ViewModelProvider(activity ?: this).get(ResultViewModel::class.java)
return inflater.inflate(R.layout.fragment_result, container, false)
}
@ -277,14 +275,14 @@ class ResultFragment : Fragment() {
activity?.fixPaddingStatusbar(result_scroll)
//activity?.fixPaddingStatusbar(result_barstatus)
val backParameter = result_back.layoutParams as CoordinatorLayout.LayoutParams
backParameter.setMargins(
backParameter.leftMargin,
backParameter.topMargin + requireContext().getStatusBarHeight(),
backParameter.rightMargin,
backParameter.bottomMargin
)
result_back.layoutParams = backParameter
/* val backParameter = result_back.layoutParams as FrameLayout.LayoutParams
backParameter.setMargins(
backParameter.leftMargin,
backParameter.topMargin + requireContext().getStatusBarHeight(),
backParameter.rightMargin,
backParameter.bottomMargin
)
result_back.layoutParams = backParameter*/
// activity?.fixPaddingStatusbar(result_toolbar)
@ -328,14 +326,14 @@ class ResultFragment : Fragment() {
}
result_scroll.setOnScrollChangeListener(NestedScrollView.OnScrollChangeListener { _, _, scrollY, _, _ ->
if (result_poster_blur == null) return@OnScrollChangeListener
result_poster_blur.alpha = maxOf(0f, (0.7f - scrollY / 1000f))
//result_poster_blur.alpha = maxOf(0f, (0.7f - scrollY / 1000f))
val setAlpha = 1f - scrollY / 200f
result_back.alpha = setAlpha
// result_back.alpha = setAlpha
result_poster_blur_holder.translationY = -scrollY.toFloat()
// result_back.translationY = -scrollY.toFloat()
//result_barstatus.alpha = scrollY / 200f
//result_barstatus.visibility = if (scrollY > 0) View.VISIBLE else View.GONE§
result_back.visibility = if (setAlpha > 0) VISIBLE else GONE
//result_back.visibility = if (setAlpha > 0) VISIBLE else GONE
})
// result_toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24)
@ -509,7 +507,7 @@ class ResultFragment : Fragment() {
epData.id,
parentId,
epData.rating,
epData.descript,
epData.description,
System.currentTimeMillis(),
)
)
@ -528,7 +526,14 @@ class ResultFragment : Fragment() {
val downloadList = ctx.getDownloadSubsLanguageISO639_1()
main {
subs?.let { subsList ->
subsList.filter { downloadList.contains(SubtitleHelper.fromLanguageToTwoLetters(it.lang, true)) }
subsList.filter {
downloadList.contains(
SubtitleHelper.fromLanguageToTwoLetters(
it.lang,
true
)
)
}
.map { ExtractorSubtitleLink(it.lang, it.url, "") }
.forEach { link ->
val epName = meta.name ?: "${context?.getString(R.string.episode)} ${meta.episode}"
@ -927,7 +932,7 @@ class ResultFragment : Fragment() {
}
result_vpn?.visibility = if (api.vpnStatus == VPNStatus.None) GONE else VISIBLE
result_info?.text = when (api.providerType){
result_info?.text = when (api.providerType) {
ProviderType.MetaProvider -> getString(R.string.provider_info_meta)
else -> ""
}
@ -952,7 +957,7 @@ class ResultFragment : Fragment() {
}
result_search?.setOnClickListener {
QuickSearchFragment.push(activity,true, d.name)
QuickSearchFragment.push(activity, true, d.name)
}
result_share?.setOnClickListener {
@ -974,45 +979,36 @@ class ResultFragment : Fragment() {
metadataInfoArray.add(Pair(R.string.status, getString(status)))
}
}
if (d.year != null) metadataInfoArray.add(Pair(R.string.year, d.year.toString()))
val rating = d.rating
if (rating != null) metadataInfoArray.add(
Pair(
R.string.rating,
"%.1f/10.0".format(rating.toFloat() / 10f).replace(",", ".")
)
)
val duration = d.duration
if (duration != null) metadataInfoArray.add(Pair(R.string.duration, duration))
metadataInfoArray.add(Pair(R.string.site, d.apiName))
context?.let { ctx ->
if (metadataInfoArray.size > 0) {
result_metadata.visibility = VISIBLE
val text = SpannableStringBuilder()
val grayColor =
ctx.colorFromAttribute(R.attr.grayTextColor) //ContextCompat.getColor(requireContext(), R.color.grayTextColor)
val textColor =
ctx.colorFromAttribute(R.attr.textColor) //ContextCompat.getColor(requireContext(), R.color.textColor)
for (meta in metadataInfoArray) {
text.color(grayColor) { append(getString(meta.first) + ": ") }
.color(textColor) { append("${meta.second}\n") }
}
result_metadata.text = text
} else {
result_metadata.visibility = GONE
}
result_meta_year?.isGone = d.year == null
result_meta_year?.text = d.year?.toString() ?: ""
if (d.rating == null) {
result_meta_rating?.isVisible = false
} else {
result_meta_rating?.isVisible = true
result_meta_rating?.text = "%.1f/10.0".format(d.rating!!.toFloat() / 10f).replace(",", ".")
}
val duration = d.duration
if (duration.isNullOrEmpty()) {
result_meta_duration?.isVisible = false
} else {
result_meta_duration?.isVisible = true
result_meta_duration?.text =
if (duration.endsWith("min") || duration.endsWith("h")) duration else "${duration}min"
}
result_meta_site?.text = d.apiName
result_poster?.setImage(d.posterUrl)
result_poster_blur?.setImageBlur(d.posterUrl, 10, 3)
result_poster_holder?.visibility = if (d.posterUrl.isNullOrBlank()) GONE else VISIBLE
result_play_movie?.text =
if (d.type == TvType.Torrent) getString(R.string.play_torrent_button) else getString(R.string.play_movie_button)
result_plot_header?.text =
if (d.type == TvType.Torrent) getString(R.string.torrent_plot) else getString(R.string.result_plot)
//result_plot_header?.text =
// if (d.type == TvType.Torrent) getString(R.string.torrent_plot) else getString(R.string.result_plot)
if (!d.plot.isNullOrEmpty()) {
var syno = d.plot!!
if (syno.length > MAX_SYNO_LENGH) {
@ -1031,14 +1027,14 @@ class ResultFragment : Fragment() {
}
result_tag?.removeAllViews()
result_tag_holder?.visibility = GONE
//result_tag_holder?.visibility = GONE
// result_status.visibility = GONE
val tags = d.tags
if (tags.isNullOrEmpty()) {
result_tag_holder?.visibility = GONE
//result_tag_holder?.visibility = GONE
} else {
result_tag_holder?.visibility = VISIBLE
//result_tag_holder?.visibility = VISIBLE
for ((index, tag) in tags.withIndex()) {
val viewBtt = layoutInflater.inflate(R.layout.result_tag, null)
@ -1167,7 +1163,17 @@ class ResultFragment : Fragment() {
viewModel.load(it.context, tempUrl, apiName, showFillers)
}
result_reload_connection_open_in_browser.setOnClickListener {
result_reload_connection_open_in_browser?.setOnClickListener {
val i = Intent(ACTION_VIEW)
i.data = Uri.parse(tempUrl)
try {
startActivity(i)
} catch (e: Exception) {
e.printStackTrace()
}
}
result_meta_site?.setOnClickListener {
val i = Intent(ACTION_VIEW)
i.data = Uri.parse(tempUrl)
try {

View file

@ -37,6 +37,8 @@ import com.bumptech.glide.load.model.GlideUrl
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
import com.lagradost.cloudstream3.utils.GlideOptions.bitmapTransform
import jp.wasabeef.glide.transformations.BlurTransformation
import kotlin.math.roundToInt
@ -112,6 +114,17 @@ object UIHelper {
}
}
fun ImageView?.setImageBlur(url: String?, radius : Int, sample : Int = 3) {
if (this == null || url.isNullOrBlank()) return
try {
GlideApp.with(this.context)
.load(GlideUrl(url)).apply(bitmapTransform(BlurTransformation(radius, sample)))
.into(this)
} catch (e: Exception) {
logError(e)
}
}
fun adjustAlpha(@ColorInt color: Int, factor: Float): Int {
val alpha = (Color.alpha(color) * factor).roundToInt()
val red = Color.red(color)

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/result_root"
@ -21,7 +21,7 @@
android:id="@+id/result_loading_error"
android:visibility="gone"
tools:visibility="visible"
tools:visibility="gone"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_width="match_parent"
@ -71,17 +71,16 @@
<FrameLayout
android:id="@+id/result_poster_blur_holder"
android:visibility="gone"
android:alpha="0"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="180dp">
android:layout_height="230dp">
<ImageView
android:id="@+id/result_poster_blur"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:alpha="0.7"
android:alpha="0"
tools:src="@drawable/example_poster"
android:background="?attr/primaryGrayBackground"
tools:ignore="ContentDescription"/>
@ -94,115 +93,46 @@
</FrameLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/result_scroll"
android:background="?attr/primaryGrayBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:background="?attr/primaryBlackBackground"
android:orientation="vertical"
android:layout_marginStart="@dimen/result_padding"
android:layout_marginEnd="@dimen/result_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--
<LinearLayout android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="30dp">
<ImageView android:id="@+id/result_back" android:src="@drawable/ic_baseline_arrow_back_24"
android:layout_width="wrap_content" android:layout_height="match_parent">
</ImageView>
</LinearLayout>-->
<LinearLayout
android:layout_marginTop="@dimen/result_padding"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:id="@+id/result_poster_holder"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:layout_width="100dp"
android:layout_height="140dp">
<ImageView
android:foreground="@drawable/outline_drawable"
android:id="@+id/result_poster"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:src="@drawable/example_poster"
android:contentDescription="@string/result_poster_img_des"/>
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_marginStart="10dp"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/result_title"
android:layout_marginEnd="50dp"
tools:text="The Perfect Run The Perfect Run The Perfect Run"
android:textSize="20sp"
android:textStyle="normal"
android:textColor="?attr/textColor" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/result_metadata"
tools:text="2021\nda"
android:paddingTop="3sp"
android:lineSpacingExtra="3sp"
android:textStyle="normal"
android:textSize="15sp"
android:textColor="?attr/textColor" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<!--<TextView
android:id="@+id/result_rating"
tools:text="2021"
android:textStyle="normal"
android:textSize="15sp"
android:textColor="?attr/textColor" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>-->
</LinearLayout>
</LinearLayout>
<GridLayout
<FrameLayout
android:background="?attr/primaryGrayBackground"
android:paddingStart="@dimen/result_padding"
android:paddingEnd="@dimen/result_padding"
android:layout_width="match_parent"
android:layout_height="50dp">
<com.google.android.material.button.MaterialButton
android:layout_marginStart="0dp"
android:nextFocusLeft="@id/result_openinbrower"
android:nextFocusDown="@id/result_descript"
android:nextFocusUp="@id/result_back"
android:nextFocusRight="@id/result_share"
android:layout_height="wrap_content">
<ImageView
android:nextFocusDown="@id/result_bookmark_button"
android:nextFocusRight="@id/result_bookmark_button"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:layout_gravity="center_vertical"
app:cornerRadius="4dp"
android:id="@+id/result_bookmark_button"
tools:text="Bookmark"
android:id="@+id/result_back"
android:clickable="true"
android:focusable="true"
style="@style/MultiSelectButton">
<requestFocus/>
</com.google.android.material.button.MaterialButton>
<!--<ImageView
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_bookmark_border_24"
android:layout_width="wrap_content"
android:layout_height="match_parent">
</ImageView>-->
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical|start"
android:tint="?attr/white"
android:src="@drawable/ic_baseline_arrow_back_24"
android:contentDescription="@string/result_go_back">
</ImageView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
@ -226,7 +156,8 @@
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_outline_share_24"
android:layout_gravity="center" android:contentDescription="@string/result_share">
android:layout_gravity="end|center_vertical"
android:contentDescription="@string/result_share">
</ImageView>
<ImageView
android:nextFocusUp="@id/result_back"
@ -244,7 +175,7 @@
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_public_24"
android:layout_gravity="center"
android:layout_gravity="end|center_vertical"
android:contentDescription="@string/result_open_in_browser">
</ImageView>
@ -264,128 +195,229 @@
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/search_icon"
android:layout_gravity="center"
android:layout_gravity="end|center_vertical"
android:contentDescription="@string/result_open_in_browser">
</ImageView>
</LinearLayout>
</GridLayout>
<TextView
android:id="@+id/result_vpn"
android:textSize="15sp"
tools:text="@string/vpn_torrent"
android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/result_info"
android:textSize="15sp"
tools:text="@string/provider_info_meta"
android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/result_plot_header"
android:text="@string/result_plot"
android:textSize="17sp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textStyle="normal"
android:textColor="?attr/textColor"
/>
<TextView
android:textColor="?attr/textColor"
android:padding="10dp"
android:foreground="@drawable/outline_drawable"
android:nextFocusUp="@id/result_bookmark_button"
android:nextFocusDown="@id/result_play_movie"
android:id="@+id/result_descript"
android:textSize="15sp"
tools:text="Ryan Quicksave Romano is an eccentric adventurer with a strange power: he can create a save-point in time and redo his life whenever he dies. Arriving in New Rome, the glitzy capital of sin of a rebuilding Europe, he finds the city torn between mega-corporations, sponsored heroes, superpowered criminals, and true monsters. It's a time of chaos, where potions can grant the power to rule the world and dangers lurk everywhere. "
android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/result_tag_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/result_tags"
android:textSize="17sp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textStyle="normal"
android:textColor="?attr/textColor"
/>
<com.lagradost.cloudstream3.widget.FlowLayout android:id="@+id/result_tag"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.lagradost.cloudstream3.widget.FlowLayout>
</FrameLayout>
<LinearLayout
android:layout_marginTop="5dp"
android:orientation="vertical"
android:id="@+id/result_movie_parent"
android:layout_marginStart="@dimen/result_padding"
android:layout_marginEnd="@dimen/result_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:layout_marginBottom="10dp"
android:nextFocusUp="@id/result_descript"
android:nextFocusDown="@id/result_download_movie"
android:id="@+id/result_play_movie"
style="@style/WhiteButton"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:layout_height="match_parent">
<LinearLayout
android:visibility="visible"
android:layout_gravity="center_vertical"
android:text="@string/play_movie_button"
app:icon="@drawable/ic_baseline_play_arrow_24"
android:layout_width="match_parent">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:nextFocusUp="@id/result_play_movie"
android:nextFocusDown="@id/result_season_button"
android:layout_marginBottom="10dp"
android:id="@+id/result_download_movie"
style="@style/BlackButton"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:visibility="visible"
android:layout_gravity="center_vertical"
tools:text="Downloading"
tools:icon="@drawable/netflix_download"
android:clickable="true"
android:focusable="true"
android:layout_width="match_parent">
</com.google.android.material.button.MaterialButton>
<androidx.core.widget.ContentLoadingProgressBar
android:layout_width="match_parent"
android:layout_height="20dp"
tools:progress="50"
android:id="@+id/result_movie_progress_downloaded"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal"
android:max="100"
android:layout_gravity="end|center_vertical"
android:progress="0"
android:visibility="gone"
tools:visibility="visible"/>
<!--
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginBottom="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp">
<androidx.core.widget.ContentLoadingProgressBar
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/result_movie_download"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:id="@+id/result_poster_holder"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:layout_width="100dp"
android:layout_height="140dp">
<ImageView
android:foreground="@drawable/outline_drawable"
android:id="@+id/result_poster"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:src="@drawable/example_poster"
android:contentDescription="@string/result_poster_img_des"/>
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_marginStart="10dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:paddingEnd="40dp"
android:layout_height="40dp"
android:layout_height="match_parent">
<TextView
android:maxLines="2"
android:layout_marginBottom="10dp"
android:id="@+id/result_title"
tools:text="The Perfect Run The Perfect Run The Perfect Run"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="?attr/textColor" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:minWidth="0dp"
app:iconPadding="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:stateListAnimator="@null"
style="@style/BlackButton"
tools:text="Gogoanime"
android:id="@+id/result_meta_site"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:textSize="12sp"
android:layout_width="wrap_content"
android:layout_height="24dp">
</com.google.android.material.button.MaterialButton>
<TextView
android:id="@+id/result_meta_year"
android:layout_marginStart="10dp"
tools:text="2021"
android:layout_gravity="center_vertical"
android:textColor="?attr/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/result_meta_rating"
android:layout_marginStart="10dp"
tools:text="Rated: 8.5/10.0"
android:layout_gravity="center_vertical"
android:textColor="?attr/textColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/result_meta_duration"
android:layout_marginStart="10dp"
tools:text="121min"
android:layout_gravity="center_vertical"
android:textColor="?attr/textColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:textColor="?attr/textColor"
android:foreground="@drawable/outline_drawable"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:nextFocusUp="@id/result_bookmark_button"
android:nextFocusDown="@id/result_play_movie"
android:id="@+id/result_descript"
android:textSize="15sp"
tools:text="Ryan Quicksave Romano is an eccentric adventurer with a strange power: he can create a save-point in time and redo his life whenever he dies. Arriving in New Rome, the glitzy capital of sin of a rebuilding Europe, he finds the city torn between mega-corporations, sponsored heroes, superpowered criminals, and true monsters. It's a time of chaos, where potions can grant the power to rule the world and dangers lurk everywhere. "
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
<ImageView
android:src="@drawable/background_shadow"
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_height="30dp"
tools:ignore="ContentDescription"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:layout_marginTop="0dp"
android:paddingTop="0dp"
android:layout_marginStart="0dp"
android:layout_marginBottom="10dp"
android:minWidth="100dp"
app:icon="@drawable/ic_baseline_bookmark_24"
android:backgroundTint="?attr/primaryBlackBackground"
android:nextFocusLeft="@id/result_openinbrower"
android:nextFocusDown="@id/result_descript"
android:nextFocusUp="@id/result_back"
android:nextFocusRight="@id/result_share"
android:layout_gravity="center_vertical"
app:cornerRadius="4dp"
android:id="@+id/result_bookmark_button"
tools:text="Bookmark"
android:layout_width="wrap_content"
style="@style/BlackButton"
>
<requestFocus/>
</com.google.android.material.button.MaterialButton>
<TextView
android:textColor="?attr/grayTextColor"
android:id="@+id/result_vpn"
android:textSize="15sp"
tools:text="@string/vpn_torrent"
android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView>
<TextView
android:layout_marginBottom="5dp"
android:textColor="?attr/grayTextColor"
android:id="@+id/result_info"
android:textSize="15sp"
tools:text="@string/provider_info_meta"
android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView>
<TextView
android:visibility="gone"
android:id="@+id/result_tag_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/result_tags"
android:textSize="17sp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textStyle="normal"
android:textColor="?attr/textColor"
/>
<com.lagradost.cloudstream3.widget.FlowLayout
android:id="@+id/result_tag"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_marginTop="5dp"
android:orientation="vertical"
android:id="@+id/result_movie_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:layout_marginBottom="10dp"
android:nextFocusUp="@id/result_descript"
android:nextFocusDown="@id/result_download_movie"
android:id="@+id/result_play_movie"
style="@style/WhiteButton"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:visibility="visible"
android:layout_gravity="center_vertical"
android:text="@string/play_movie_button"
app:icon="@drawable/ic_baseline_play_arrow_24"
android:layout_width="match_parent">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:nextFocusUp="@id/result_play_movie"
android:nextFocusDown="@id/result_season_button"
android:layout_marginBottom="10dp"
android:id="@+id/result_download_movie"
style="@style/BlackButton"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:visibility="visible"
android:layout_gravity="center_vertical"
tools:text="Downloading"
tools:icon="@drawable/netflix_download"
android:clickable="true"
android:focusable="true"
android:layout_width="match_parent">
</com.google.android.material.button.MaterialButton>
<androidx.core.widget.ContentLoadingProgressBar
android:layout_width="match_parent"
android:layout_height="20dp"
tools:progress="50"
android:id="@+id/result_movie_progress_downloaded"
android:indeterminate="false"
@ -393,119 +425,141 @@
android:max="100"
android:layout_gravity="end|center_vertical"
android:progress="0"
android:visibility="visible"
tools:visibility="gone"
tools:ignore="RtlSymmetry"/>
<ImageView
app:layout_constraintTop_toTopOf="parent"
android:visibility="visible"
android:layout_height="40dp"
android:layout_width="40dp"
android:layout_columnWeight="1"
android:layout_gravity="end|center_vertical"
android:padding="2dp"
android:id="@+id/result_movie_download"
android:background="?selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_play_arrow_24"
android:contentDescription="@string/download_descript"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
-->
<TextView
android:id="@+id/result_movie_text_progress"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
tools:text="128MB / 237MB"
android:textColor="?attr/grayTextColor"
android:layout_width="wrap_content"
android:layout_height="match_parent">
</TextView>
</LinearLayout>
android:visibility="gone"
tools:visibility="visible"/>
<!--
<androidx.constraintlayout.widget.ConstraintLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp">
<androidx.core.widget.ContentLoadingProgressBar
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/result_movie_download"
android:layout_width="match_parent"
android:paddingEnd="40dp"
android:layout_height="40dp"
tools:progress="50"
android:id="@+id/result_movie_progress_downloaded"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal"
android:max="100"
android:layout_gravity="end|center_vertical"
android:progress="0"
android:visibility="visible"
tools:visibility="gone"
tools:ignore="RtlSymmetry"/>
<ImageView
app:layout_constraintTop_toTopOf="parent"
android:visibility="visible"
android:layout_height="40dp"
android:layout_width="40dp"
android:layout_columnWeight="1"
android:layout_gravity="end|center_vertical"
android:padding="2dp"
android:id="@+id/result_movie_download"
android:background="?selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_play_arrow_24"
android:contentDescription="@string/download_descript"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
-->
<TextView
android:id="@+id/result_movie_text_progress"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
tools:text="128MB / 237MB"
android:textColor="?attr/grayTextColor"
android:layout_width="wrap_content"
android:layout_height="match_parent">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="Season 1"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_episode_select"
android:nextFocusLeft="@id/result_episode_select"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_season_button"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="50-100"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_season_button"
android:nextFocusLeft="@id/result_season_button"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_episode_select"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton"
/>
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="Dubbed"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_season_button"
android:nextFocusLeft="@id/result_season_button"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_dub_select"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/result_episodes_text"
tools:text="8 Episodes"
android:textSize="17sp"
android:layout_marginTop="10dp"
<LinearLayout
android:layout_marginBottom="10dp"
android:textStyle="normal"
android:textColor="?attr/textColor"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="Season 1"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_episode_select"
android:nextFocusLeft="@id/result_episode_select"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_season_button"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="50-100"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_season_button"
android:nextFocusLeft="@id/result_season_button"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_episode_select"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton"
/>
<com.google.android.material.button.MaterialButton
tools:visibility="visible"
tools:text="Dubbed"
android:nextFocusUp="@id/result_descript"
android:nextFocusRight="@id/result_season_button"
android:nextFocusLeft="@id/result_season_button"
android:nextFocusDown="@id/result_episodes"
android:id="@+id/result_dub_select"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_marginStart="0dp"
style="@style/MultiSelectButton"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/result_episodes_text"
tools:text="8 Episodes"
android:textSize="17sp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textStyle="normal"
android:textColor="?attr/textColor"
/>
</LinearLayout>
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/result_episode_loading"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_gravity="center"
android:layout_width="50dp"
android:layout_height="50dp">
</androidx.core.widget.ContentLoadingProgressBar>
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
android:id="@+id/result_episodes"
android:layout_marginTop="0dp"
android:paddingBottom="100dp"
tools:listitem="@layout/result_episode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/result_episode_loading"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_gravity="center"
android:layout_width="50dp"
android:layout_height="50dp">
</androidx.core.widget.ContentLoadingProgressBar>
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
android:id="@+id/result_episodes"
android:layout_marginTop="0dp"
android:paddingBottom="100dp"
tools:listitem="@layout/result_episode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
@ -544,20 +598,5 @@
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/search_poster_descript"/>
</androidx.cardview.widget.CardView>-->
<ImageView
android:nextFocusDown="@id/result_bookmark_button"
android:nextFocusRight="@id/result_bookmark_button"
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_margin="@dimen/result_padding"
android:layout_gravity="end"
android:tint="?attr/white"
android:src="@drawable/ic_baseline_clear_24"
android:contentDescription="@string/result_go_back">
</ImageView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>

View file

@ -14,7 +14,8 @@
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/AppTextViewStyle"
android:id="@android:id/text1"
android:layout_width="match_parent"
@ -30,6 +31,7 @@
tools:text="TEST"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:ellipsize="marquee"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:drawableStart="@drawable/ic_baseline_check_24"
android:drawableTint="@color/check_selection_color"
tools:drawableTint="?attr/textColor"