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

View file

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

View file

@ -9,7 +9,6 @@ import android.content.Intent
import android.content.Intent.* import android.content.Intent.*
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.text.SpannableStringBuilder
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.View.GONE import android.view.View.GONE
@ -17,9 +16,8 @@ import android.view.View.VISIBLE
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.FileProvider import androidx.core.content.FileProvider
import androidx.core.text.color import androidx.core.view.isGone
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView import androidx.core.widget.NestedScrollView
import androidx.fragment.app.Fragment 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.checkWrite
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar 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.hideKeyboard
import com.lagradost.cloudstream3.utils.UIHelper.navigate import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage 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.popupMenuNoIconsAndNoStringRes
import com.lagradost.cloudstream3.utils.UIHelper.requestRW import com.lagradost.cloudstream3.utils.UIHelper.requestRW
import com.lagradost.cloudstream3.utils.UIHelper.setImage import com.lagradost.cloudstream3.utils.UIHelper.setImage
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.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
@ -76,7 +74,7 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import java.io.File 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_NORMAL = 0
const val START_ACTION_RESUME_LATEST = 1 const val START_ACTION_RESUME_LATEST = 1
@ -96,7 +94,7 @@ data class ResultEpisode(
val position: Long, // time in MS val position: Long, // time in MS
val duration: Long, // duration in MS val duration: Long, // duration in MS
val rating: Int?, val rating: Int?,
val descript: String?, val description: String?,
val isFiller: Boolean?, val isFiller: Boolean?,
) )
@ -277,14 +275,14 @@ class ResultFragment : Fragment() {
activity?.fixPaddingStatusbar(result_scroll) activity?.fixPaddingStatusbar(result_scroll)
//activity?.fixPaddingStatusbar(result_barstatus) //activity?.fixPaddingStatusbar(result_barstatus)
val backParameter = result_back.layoutParams as CoordinatorLayout.LayoutParams /* val backParameter = result_back.layoutParams as FrameLayout.LayoutParams
backParameter.setMargins( backParameter.setMargins(
backParameter.leftMargin, backParameter.leftMargin,
backParameter.topMargin + requireContext().getStatusBarHeight(), backParameter.topMargin + requireContext().getStatusBarHeight(),
backParameter.rightMargin, backParameter.rightMargin,
backParameter.bottomMargin backParameter.bottomMargin
) )
result_back.layoutParams = backParameter result_back.layoutParams = backParameter*/
// activity?.fixPaddingStatusbar(result_toolbar) // activity?.fixPaddingStatusbar(result_toolbar)
@ -328,14 +326,14 @@ class ResultFragment : Fragment() {
} }
result_scroll.setOnScrollChangeListener(NestedScrollView.OnScrollChangeListener { _, _, scrollY, _, _ -> result_scroll.setOnScrollChangeListener(NestedScrollView.OnScrollChangeListener { _, _, scrollY, _, _ ->
if (result_poster_blur == null) return@OnScrollChangeListener 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 val setAlpha = 1f - scrollY / 200f
result_back.alpha = setAlpha // result_back.alpha = setAlpha
result_poster_blur_holder.translationY = -scrollY.toFloat() result_poster_blur_holder.translationY = -scrollY.toFloat()
// result_back.translationY = -scrollY.toFloat() // result_back.translationY = -scrollY.toFloat()
//result_barstatus.alpha = scrollY / 200f //result_barstatus.alpha = scrollY / 200f
//result_barstatus.visibility = if (scrollY > 0) View.VISIBLE else View.GONE§ //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) // result_toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24)
@ -509,7 +507,7 @@ class ResultFragment : Fragment() {
epData.id, epData.id,
parentId, parentId,
epData.rating, epData.rating,
epData.descript, epData.description,
System.currentTimeMillis(), System.currentTimeMillis(),
) )
) )
@ -528,7 +526,14 @@ class ResultFragment : Fragment() {
val downloadList = ctx.getDownloadSubsLanguageISO639_1() val downloadList = ctx.getDownloadSubsLanguageISO639_1()
main { main {
subs?.let { subsList -> 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, "") } .map { ExtractorSubtitleLink(it.lang, it.url, "") }
.forEach { link -> .forEach { link ->
val epName = meta.name ?: "${context?.getString(R.string.episode)} ${meta.episode}" 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_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) ProviderType.MetaProvider -> getString(R.string.provider_info_meta)
else -> "" else -> ""
} }
@ -952,7 +957,7 @@ class ResultFragment : Fragment() {
} }
result_search?.setOnClickListener { result_search?.setOnClickListener {
QuickSearchFragment.push(activity,true, d.name) QuickSearchFragment.push(activity, true, d.name)
} }
result_share?.setOnClickListener { result_share?.setOnClickListener {
@ -974,45 +979,36 @@ class ResultFragment : Fragment() {
metadataInfoArray.add(Pair(R.string.status, getString(status))) 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)) result_meta_year?.isGone = d.year == null
result_meta_year?.text = d.year?.toString() ?: ""
context?.let { ctx -> if (d.rating == null) {
if (metadataInfoArray.size > 0) { result_meta_rating?.isVisible = false
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 { } else {
result_metadata.visibility = GONE 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?.setImage(d.posterUrl)
result_poster_blur?.setImageBlur(d.posterUrl, 10, 3)
result_poster_holder?.visibility = if (d.posterUrl.isNullOrBlank()) GONE else VISIBLE result_poster_holder?.visibility = if (d.posterUrl.isNullOrBlank()) GONE else VISIBLE
result_play_movie?.text = result_play_movie?.text =
if (d.type == TvType.Torrent) getString(R.string.play_torrent_button) else getString(R.string.play_movie_button) if (d.type == TvType.Torrent) getString(R.string.play_torrent_button) else getString(R.string.play_movie_button)
result_plot_header?.text = //result_plot_header?.text =
if (d.type == TvType.Torrent) getString(R.string.torrent_plot) else getString(R.string.result_plot) // if (d.type == TvType.Torrent) getString(R.string.torrent_plot) else getString(R.string.result_plot)
if (!d.plot.isNullOrEmpty()) { if (!d.plot.isNullOrEmpty()) {
var syno = d.plot!! var syno = d.plot!!
if (syno.length > MAX_SYNO_LENGH) { if (syno.length > MAX_SYNO_LENGH) {
@ -1031,14 +1027,14 @@ class ResultFragment : Fragment() {
} }
result_tag?.removeAllViews() result_tag?.removeAllViews()
result_tag_holder?.visibility = GONE //result_tag_holder?.visibility = GONE
// result_status.visibility = GONE // result_status.visibility = GONE
val tags = d.tags val tags = d.tags
if (tags.isNullOrEmpty()) { if (tags.isNullOrEmpty()) {
result_tag_holder?.visibility = GONE //result_tag_holder?.visibility = GONE
} else { } else {
result_tag_holder?.visibility = VISIBLE //result_tag_holder?.visibility = VISIBLE
for ((index, tag) in tags.withIndex()) { for ((index, tag) in tags.withIndex()) {
val viewBtt = layoutInflater.inflate(R.layout.result_tag, null) val viewBtt = layoutInflater.inflate(R.layout.result_tag, null)
@ -1167,7 +1163,17 @@ class ResultFragment : Fragment() {
viewModel.load(it.context, tempUrl, apiName, showFillers) 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) val i = Intent(ACTION_VIEW)
i.data = Uri.parse(tempUrl) i.data = Uri.parse(tempUrl)
try { try {

View file

@ -37,6 +37,8 @@ import com.bumptech.glide.load.model.GlideUrl
import com.lagradost.cloudstream3.R import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings 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 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 { fun adjustAlpha(@ColorInt color: Int, factor: Float): Int {
val alpha = (Color.alpha(color) * factor).roundToInt() val alpha = (Color.alpha(color) * factor).roundToInt()
val red = Color.red(color) val red = Color.red(color)

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout <FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:id="@+id/result_root" android:id="@+id/result_root"
@ -21,7 +21,7 @@
android:id="@+id/result_loading_error" android:id="@+id/result_loading_error"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" tools:visibility="gone"
android:orientation="vertical" android:orientation="vertical"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -71,17 +71,16 @@
<FrameLayout <FrameLayout
android:id="@+id/result_poster_blur_holder" android:id="@+id/result_poster_blur_holder"
android:visibility="gone" android:visibility="visible"
android:alpha="0"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="180dp"> android:layout_height="230dp">
<ImageView <ImageView
android:id="@+id/result_poster_blur" android:id="@+id/result_poster_blur"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:alpha="0.7" android:alpha="0"
tools:src="@drawable/example_poster" tools:src="@drawable/example_poster"
android:background="?attr/primaryGrayBackground" android:background="?attr/primaryGrayBackground"
tools:ignore="ContentDescription"/> tools:ignore="ContentDescription"/>
@ -94,115 +93,46 @@
</FrameLayout> </FrameLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/result_scroll" android:id="@+id/result_scroll"
android:background="?attr/primaryGrayBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:background="?attr/primaryBlackBackground"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginStart="@dimen/result_padding"
android:layout_marginEnd="@dimen/result_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<!-- <FrameLayout
<LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:background="?attr/primaryGrayBackground"
android:layout_height="30dp"> android:paddingStart="@dimen/result_padding"
<ImageView android:id="@+id/result_back" android:src="@drawable/ic_baseline_arrow_back_24" android:paddingEnd="@dimen/result_padding"
android:layout_width="wrap_content" android:layout_height="match_parent"> android:layout_width="match_parent"
</ImageView>
</LinearLayout>-->
<LinearLayout
android:layout_marginTop="@dimen/result_padding"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="wrap_content"> 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 <ImageView
android:foreground="@drawable/outline_drawable" android:nextFocusDown="@id/result_bookmark_button"
android:nextFocusRight="@id/result_bookmark_button"
android:id="@+id/result_poster" android:background="?android:attr/selectableItemBackgroundBorderless"
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>
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:tint="?attr/white"
android:src="@drawable/ic_baseline_arrow_back_24"
android:contentDescription="@string/result_go_back">
</ImageView>
<LinearLayout <LinearLayout
android:layout_marginStart="10dp" android:gravity="end"
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
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp"> 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_gravity="center_vertical"
app:cornerRadius="4dp"
android:id="@+id/result_bookmark_button"
tools:text="Bookmark"
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>-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/media_route_button_holder" android:id="@+id/media_route_button_holder"
android:layout_gravity="center_vertical|end" android:layout_gravity="center_vertical|end"
> >
<androidx.mediarouter.app.MediaRouteButton <androidx.mediarouter.app.MediaRouteButton
android:layout_gravity="end|center_vertical"
android:id="@+id/media_route_button" android:id="@+id/media_route_button"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
@ -226,7 +156,8 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_outline_share_24" 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>
<ImageView <ImageView
android:nextFocusUp="@id/result_back" android:nextFocusUp="@id/result_back"
@ -244,7 +175,7 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_public_24" android:src="@drawable/ic_baseline_public_24"
android:layout_gravity="center" android:layout_gravity="end|center_vertical"
android:contentDescription="@string/result_open_in_browser"> android:contentDescription="@string/result_open_in_browser">
</ImageView> </ImageView>
@ -264,49 +195,170 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/search_icon" android:src="@drawable/search_icon"
android:layout_gravity="center" android:layout_gravity="end|center_vertical"
android:contentDescription="@string/result_open_in_browser"> android:contentDescription="@string/result_open_in_browser">
</ImageView> </ImageView>
</LinearLayout> </LinearLayout>
</GridLayout> </FrameLayout>
<TextView <LinearLayout
android:id="@+id/result_vpn" android:orientation="vertical"
android:textSize="15sp" android:layout_marginStart="@dimen/result_padding"
tools:text="@string/vpn_torrent" android:layout_marginEnd="@dimen/result_padding"
android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_width="match_parent"
</TextView> android:layout_height="match_parent">
<TextView <LinearLayout
android:id="@+id/result_info" android:visibility="visible"
android:textSize="15sp" android:layout_marginBottom="15dp"
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_marginTop="10dp"
android:layout_marginBottom="10dp" android:orientation="horizontal"
android:textStyle="normal" android:layout_width="match_parent"
android:textColor="?attr/textColor" android:layout_height="wrap_content">
/> <androidx.cardview.widget.CardView
android:id="@+id/result_poster_holder"
<TextView app:cardCornerRadius="@dimen/rounded_image_radius"
android:textColor="?attr/textColor" android:layout_width="100dp"
android:padding="10dp" android:layout_height="140dp">
<ImageView
android:foreground="@drawable/outline_drawable" 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: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:nextFocusUp="@id/result_bookmark_button"
android:nextFocusDown="@id/result_play_movie" android:nextFocusDown="@id/result_play_movie"
android:id="@+id/result_descript" android:id="@+id/result_descript"
android:textSize="15sp" 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. " 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"> android:layout_width="match_parent" android:layout_height="wrap_content">
</TextView> </TextView>
<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:id="@+id/result_tag_holder"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -317,11 +369,12 @@
android:textStyle="normal" android:textStyle="normal"
android:textColor="?attr/textColor" android:textColor="?attr/textColor"
/> />
<com.lagradost.cloudstream3.widget.FlowLayout android:id="@+id/result_tag" <com.lagradost.cloudstream3.widget.FlowLayout
android:id="@+id/result_tag"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"/>
</com.lagradost.cloudstream3.widget.FlowLayout>
<LinearLayout <LinearLayout
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:orientation="vertical" android:orientation="vertical"
@ -507,6 +560,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<LinearLayout <LinearLayout
android:layout_gravity="bottom" android:layout_gravity="bottom"
@ -544,20 +598,5 @@
android:foreground="?android:attr/selectableItemBackgroundBorderless" android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/search_poster_descript"/> android:contentDescription="@string/search_poster_descript"/>
</androidx.cardview.widget.CardView>--> </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" </FrameLayout>
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>

View file

@ -14,7 +14,8 @@
--> -->
<TextView <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" style="@style/AppTextViewStyle"
android:id="@android:id/text1" android:id="@android:id/text1"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -30,6 +31,7 @@
tools:text="TEST" tools:text="TEST"
android:checkMark="?android:attr/listChoiceIndicatorSingle" android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:ellipsize="marquee" android:ellipsize="marquee"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:drawableStart="@drawable/ic_baseline_check_24" android:drawableStart="@drawable/ic_baseline_check_24"
android:drawableTint="@color/check_selection_color" android:drawableTint="@color/check_selection_color"
tools:drawableTint="?attr/textColor" tools:drawableTint="?attr/textColor"