mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
54effd6c80
35 changed files with 382 additions and 355 deletions
|
@ -145,11 +145,75 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class FocusDirection {
|
||||||
|
Left,
|
||||||
|
Right,
|
||||||
|
Up,
|
||||||
|
Down,
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getNextFocus(view: View?, direction: FocusDirection, depth: Int = 0): Int? {
|
||||||
|
if (view == null || depth >= 10) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
val nextId = when (direction) {
|
||||||
|
FocusDirection.Left -> {
|
||||||
|
view.nextFocusLeftId
|
||||||
|
}
|
||||||
|
FocusDirection.Up -> {
|
||||||
|
view.nextFocusUpId
|
||||||
|
}
|
||||||
|
FocusDirection.Right -> {
|
||||||
|
view.nextFocusRightId
|
||||||
|
}
|
||||||
|
FocusDirection.Down -> {
|
||||||
|
view.nextFocusDownId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return if (nextId != -1) {
|
||||||
|
val next = findViewById<View?>(nextId)
|
||||||
|
//println("NAME: ${next.accessibilityClassName} | ${next?.isShown}" )
|
||||||
|
|
||||||
|
if (next?.isShown == false) {
|
||||||
|
getNextFocus(next, direction, depth + 1)
|
||||||
|
} else {
|
||||||
|
if (depth == 0) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
nextId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
||||||
event?.keyCode?.let { keyCode ->
|
event?.keyCode?.let { keyCode ->
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
ACTION_DOWN -> {
|
ACTION_DOWN -> {
|
||||||
|
if (currentFocus != null) {
|
||||||
|
val next = when (keyCode) {
|
||||||
|
KeyEvent.KEYCODE_DPAD_LEFT -> getNextFocus(currentFocus, FocusDirection.Left)
|
||||||
|
KeyEvent.KEYCODE_DPAD_RIGHT -> getNextFocus(currentFocus, FocusDirection.Right)
|
||||||
|
KeyEvent.KEYCODE_DPAD_UP -> getNextFocus(currentFocus, FocusDirection.Up)
|
||||||
|
KeyEvent.KEYCODE_DPAD_DOWN -> getNextFocus(currentFocus, FocusDirection.Down)
|
||||||
|
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next != null && next != -1) {
|
||||||
|
val nextView = findViewById<View?>(next)
|
||||||
|
if(nextView != null) {
|
||||||
|
nextView.requestFocus()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
when (keyCode) {
|
when (keyCode) {
|
||||||
|
|
||||||
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||||
println("DPAD PRESSED $currentFocus")
|
println("DPAD PRESSED $currentFocus")
|
||||||
if (currentFocus is SearchView || currentFocus is SearchView.SearchAutoComplete) {
|
if (currentFocus is SearchView || currentFocus is SearchView.SearchAutoComplete) {
|
||||||
|
@ -158,7 +222,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//println("Keycode: $keyCode")
|
//println("Keycode: $keyCode")
|
||||||
//showToast(
|
//showToast(
|
||||||
// this,
|
// this,
|
||||||
|
@ -169,6 +233,9 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keyEventListener?.invoke(event) == true) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return super.dispatchKeyEvent(event)
|
return super.dispatchKeyEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,6 +324,8 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
val onDialogDismissedEvent = Event<Int>()
|
val onDialogDismissedEvent = Event<Int>()
|
||||||
|
|
||||||
var playerEventListener: ((PlayerEventType) -> Unit)? = null
|
var playerEventListener: ((PlayerEventType) -> Unit)? = null
|
||||||
|
var keyEventListener: ((KeyEvent?) -> Boolean)? = null
|
||||||
|
|
||||||
|
|
||||||
var currentToast: Toast? = null
|
var currentToast: Toast? = null
|
||||||
|
|
||||||
|
@ -411,7 +480,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
|
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
|
||||||
val currentTheme = when (settingsManager.getString(getString(R.string.app_theme_key), "Black")) {
|
val currentTheme = when (settingsManager.getString(getString(R.string.app_theme_key), "AmoledLight")) {
|
||||||
"Black" -> R.style.AppTheme
|
"Black" -> R.style.AppTheme
|
||||||
"Light" -> R.style.LightMode
|
"Light" -> R.style.LightMode
|
||||||
"Amoled" -> R.style.AmoledMode
|
"Amoled" -> R.style.AmoledMode
|
||||||
|
|
|
@ -17,6 +17,8 @@ class HDMProvider : MainAPI() {
|
||||||
get() = setOf(
|
get() = setOf(
|
||||||
TvType.Movie,
|
TvType.Movie,
|
||||||
)
|
)
|
||||||
|
override val hasMainPage: Boolean
|
||||||
|
get() = true
|
||||||
|
|
||||||
override fun search(query: String): List<SearchResponse> {
|
override fun search(query: String): List<SearchResponse> {
|
||||||
val url = "$mainUrl/search/$query"
|
val url = "$mainUrl/search/$query"
|
||||||
|
@ -74,4 +76,49 @@ class HDMProvider : MainAPI() {
|
||||||
"$mainUrl/src/player/?v=$data", poster, year, descript, null
|
"$mainUrl/src/player/?v=$data", poster, year, descript, null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getMainPage(): HomePageResponse {
|
||||||
|
val html = get("$mainUrl", timeout = 25).text
|
||||||
|
val document = Jsoup.parse(html)
|
||||||
|
val all = ArrayList<HomePageList>()
|
||||||
|
|
||||||
|
val mainbody = document.getElementsByTag("body")
|
||||||
|
?.select("div.homeContentOuter > section > div.container > div")
|
||||||
|
// Fetch row title
|
||||||
|
val inner = mainbody?.select("div.col-md-2.col-sm-2.mrgb")
|
||||||
|
val title = mainbody?.select("div > div")?.firstOrNull()?.select("div.title.titleBar")?.text() ?: "Unnamed Row"
|
||||||
|
// Fetch list of items and map
|
||||||
|
if (inner != null) {
|
||||||
|
val elements: List<SearchResponse> = inner.map {
|
||||||
|
|
||||||
|
val aa = it.select("a").firstOrNull()
|
||||||
|
val item = aa?.select("div.item")
|
||||||
|
val href = aa?.attr("href")
|
||||||
|
val link = when (href != null) {
|
||||||
|
true -> fixUrl(href)
|
||||||
|
false -> ""
|
||||||
|
}
|
||||||
|
val name = item?.select("div.movie-details")?.text() ?: "<No Title>"
|
||||||
|
var image = item?.select("img")?.get(1)?.attr("src") ?: ""
|
||||||
|
val year = null
|
||||||
|
|
||||||
|
MovieSearchResponse(
|
||||||
|
name,
|
||||||
|
link,
|
||||||
|
this.name,
|
||||||
|
TvType.Movie,
|
||||||
|
image,
|
||||||
|
year,
|
||||||
|
null,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
all.add(
|
||||||
|
HomePageList(
|
||||||
|
title, elements
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return HomePageResponse(all)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -12,13 +12,19 @@ import com.lagradost.cloudstream3.ui.search.SearchResultBuilder
|
||||||
class HomeChildItemAdapter(
|
class HomeChildItemAdapter(
|
||||||
var cardList: List<SearchResponse>,
|
var cardList: List<SearchResponse>,
|
||||||
val layout: Int = R.layout.home_result_grid,
|
val layout: Int = R.layout.home_result_grid,
|
||||||
private val clickCallback: (SearchClickCallback) -> Unit
|
private val nextFocusUp: Int? = null,
|
||||||
|
private val nextFocusDown: Int? = null,
|
||||||
|
private val clickCallback: (SearchClickCallback) -> Unit,
|
||||||
) :
|
) :
|
||||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||||
return CardViewHolder(
|
return CardViewHolder(
|
||||||
LayoutInflater.from(parent.context).inflate(layout, parent, false), clickCallback, itemCount
|
LayoutInflater.from(parent.context).inflate(layout, parent, false),
|
||||||
|
clickCallback,
|
||||||
|
itemCount,
|
||||||
|
nextFocusUp,
|
||||||
|
nextFocusDown
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +45,11 @@ class HomeChildItemAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
class CardViewHolder
|
class CardViewHolder
|
||||||
constructor(itemView: View, private val clickCallback: (SearchClickCallback) -> Unit, val itemCount: Int) :
|
constructor(
|
||||||
|
itemView: View, private val clickCallback: (SearchClickCallback) -> Unit, private val itemCount: Int,
|
||||||
|
private val nextFocusUp: Int? = null,
|
||||||
|
private val nextFocusDown: Int? = null,
|
||||||
|
) :
|
||||||
RecyclerView.ViewHolder(itemView) {
|
RecyclerView.ViewHolder(itemView) {
|
||||||
|
|
||||||
fun bind(card: SearchResponse, index: Int) {
|
fun bind(card: SearchResponse, index: Int) {
|
||||||
|
@ -51,7 +61,7 @@ class HomeChildItemAdapter(
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResultBuilder.bind(clickCallback, card, itemView, nextFocusBehavior)
|
SearchResultBuilder.bind(clickCallback, card, itemView, nextFocusBehavior, nextFocusUp, nextFocusDown)
|
||||||
itemView.tag = index
|
itemView.tag = index
|
||||||
//val ani = ScaleAnimation(0.9f, 1.0f, 0.9f, 1f)
|
//val ani = ScaleAnimation(0.9f, 1.0f, 0.9f, 1f)
|
||||||
//ani.fillAfter = true
|
//ani.fillAfter = true
|
||||||
|
|
|
@ -35,6 +35,7 @@ import com.lagradost.cloudstream3.ui.result.START_ACTION_RESUME_LATEST
|
||||||
import com.lagradost.cloudstream3.ui.search.*
|
import com.lagradost.cloudstream3.ui.search.*
|
||||||
import com.lagradost.cloudstream3.ui.search.SearchFragment.Companion.filterSearchResponse
|
import com.lagradost.cloudstream3.ui.search.SearchFragment.Companion.filterSearchResponse
|
||||||
import com.lagradost.cloudstream3.ui.search.SearchHelper.handleSearchClickCallback
|
import com.lagradost.cloudstream3.ui.search.SearchHelper.handleSearchClickCallback
|
||||||
|
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils
|
import com.lagradost.cloudstream3.utils.AppUtils
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.loadSearchResult
|
import com.lagradost.cloudstream3.utils.AppUtils.loadSearchResult
|
||||||
import com.lagradost.cloudstream3.utils.DataStore.getKey
|
import com.lagradost.cloudstream3.utils.DataStore.getKey
|
||||||
|
@ -212,7 +213,12 @@ class HomeFragment : Fragment() {
|
||||||
|
|
||||||
val randomSize = items.size
|
val randomSize = items.size
|
||||||
home_main_poster_recyclerview.adapter =
|
home_main_poster_recyclerview.adapter =
|
||||||
HomeChildItemAdapter(items, R.layout.home_result_big_grid) { callback ->
|
HomeChildItemAdapter(
|
||||||
|
items,
|
||||||
|
R.layout.home_result_big_grid,
|
||||||
|
nextFocusUp = home_main_poster_recyclerview.nextFocusUpId,
|
||||||
|
nextFocusDown = home_main_poster_recyclerview.nextFocusDownId
|
||||||
|
) { callback ->
|
||||||
handleSearchClickCallback(activity, callback)
|
handleSearchClickCallback(activity, callback)
|
||||||
}
|
}
|
||||||
home_main_poster_recyclerview.post {
|
home_main_poster_recyclerview.post {
|
||||||
|
@ -339,7 +345,11 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
home_bookmarked_child_recyclerview.adapter = HomeChildItemAdapter(ArrayList()) { callback ->
|
home_bookmarked_child_recyclerview.adapter = HomeChildItemAdapter(
|
||||||
|
ArrayList(),
|
||||||
|
nextFocusUp = home_bookmarked_child_recyclerview?.nextFocusUpId,
|
||||||
|
nextFocusDown = home_bookmarked_child_recyclerview?.nextFocusDownId
|
||||||
|
) { callback ->
|
||||||
if (callback.action == SEARCH_ACTION_SHOW_METADATA) {
|
if (callback.action == SEARCH_ACTION_SHOW_METADATA) {
|
||||||
val id = callback.card.id
|
val id = callback.card.id
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
@ -355,7 +365,11 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
home_watch_child_recyclerview.adapter = HomeChildItemAdapter(ArrayList()) { callback ->
|
home_watch_child_recyclerview.adapter = HomeChildItemAdapter(
|
||||||
|
ArrayList(),
|
||||||
|
nextFocusUp = home_watch_child_recyclerview?.nextFocusUpId,
|
||||||
|
nextFocusDown = home_watch_child_recyclerview?.nextFocusDownId
|
||||||
|
) { callback ->
|
||||||
if (callback.action == SEARCH_ACTION_SHOW_METADATA) {
|
if (callback.action == SEARCH_ACTION_SHOW_METADATA) {
|
||||||
val id = callback.card.id
|
val id = callback.card.id
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
@ -423,6 +437,16 @@ class HomeFragment : Fragment() {
|
||||||
// nice profile pic on homepage
|
// nice profile pic on homepage
|
||||||
home_profile_picture_holder?.isVisible = false
|
home_profile_picture_holder?.isVisible = false
|
||||||
context?.let { ctx ->
|
context?.let { ctx ->
|
||||||
|
// just in case
|
||||||
|
if (ctx.isTvSettings()) {
|
||||||
|
home_change_api_loading?.isFocusable = true
|
||||||
|
home_change_api_loading?.isFocusableInTouchMode = true
|
||||||
|
home_change_api?.isFocusable = true
|
||||||
|
home_change_api?.isFocusableInTouchMode = true
|
||||||
|
home_bookmark_select?.isFocusable = true
|
||||||
|
home_bookmark_select?.isFocusableInTouchMode = true
|
||||||
|
}
|
||||||
|
|
||||||
for (syncApi in OAuth2API.OAuth2Apis) {
|
for (syncApi in OAuth2API.OAuth2Apis) {
|
||||||
val login = syncApi.loginInfo(ctx)
|
val login = syncApi.loginInfo(ctx)
|
||||||
val pic = login?.profilePicture
|
val pic = login?.profilePicture
|
||||||
|
@ -433,5 +457,7 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -47,7 +47,12 @@ class ParentItemAdapter(
|
||||||
private val moreInfo: FrameLayout = itemView.home_child_more_info
|
private val moreInfo: FrameLayout = itemView.home_child_more_info
|
||||||
fun bind(info: HomePageList) {
|
fun bind(info: HomePageList) {
|
||||||
title.text = info.name
|
title.text = info.name
|
||||||
recyclerView.adapter = HomeChildItemAdapter(info.list, clickCallback = clickCallback)
|
recyclerView.adapter = HomeChildItemAdapter(
|
||||||
|
info.list,
|
||||||
|
clickCallback = clickCallback,
|
||||||
|
nextFocusUp = recyclerView.nextFocusUpId,
|
||||||
|
nextFocusDown = recyclerView.nextFocusDownId
|
||||||
|
)
|
||||||
(recyclerView.adapter as HomeChildItemAdapter).notifyDataSetChanged()
|
(recyclerView.adapter as HomeChildItemAdapter).notifyDataSetChanged()
|
||||||
|
|
||||||
moreInfo.setOnClickListener {
|
moreInfo.setOnClickListener {
|
||||||
|
|
|
@ -143,9 +143,10 @@ class HomeViewModel : ViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_apiName.postValue(repo?.name)
|
_apiName.postValue(repo?.name)
|
||||||
|
_randomItems.postValue(listOf())
|
||||||
|
|
||||||
if (repo?.hasMainPage == true) {
|
if (repo?.hasMainPage == true) {
|
||||||
_page.postValue(Resource.Loading())
|
_page.postValue(Resource.Loading())
|
||||||
_randomItems.postValue(null)
|
|
||||||
|
|
||||||
val data = repo?.getMainPage()
|
val data = repo?.getMainPage()
|
||||||
when (data) {
|
when (data) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.app.RemoteAction
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.content.Context.AUDIO_SERVICE
|
import android.content.Context.AUDIO_SERVICE
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.database.ContentObserver
|
import android.database.ContentObserver
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
@ -19,11 +20,8 @@ import android.net.Uri
|
||||||
import android.os.*
|
import android.os.*
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.LayoutInflater
|
import android.view.*
|
||||||
import android.view.MotionEvent
|
|
||||||
import android.view.View
|
|
||||||
import android.view.View.*
|
import android.view.View.*
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.view.WindowManager.LayoutParams.*
|
import android.view.WindowManager.LayoutParams.*
|
||||||
import android.view.animation.AccelerateInterpolator
|
import android.view.animation.AccelerateInterpolator
|
||||||
import android.view.animation.AlphaAnimation
|
import android.view.animation.AlphaAnimation
|
||||||
|
@ -32,6 +30,9 @@ import android.view.animation.AnimationUtils
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import android.widget.Toast.LENGTH_SHORT
|
import android.widget.Toast.LENGTH_SHORT
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
import androidx.core.graphics.blue
|
||||||
|
import androidx.core.graphics.green
|
||||||
|
import androidx.core.graphics.red
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
|
@ -119,8 +120,8 @@ const val PLAYBACK_SPEED = "playback_speed"
|
||||||
const val RESIZE_MODE_KEY = "resize_mode" // Last used resize mode
|
const val RESIZE_MODE_KEY = "resize_mode" // Last used resize mode
|
||||||
const val PLAYBACK_SPEED_KEY = "playback_speed" // Last used playback speed
|
const val PLAYBACK_SPEED_KEY = "playback_speed" // Last used playback speed
|
||||||
|
|
||||||
const val OPENING_PRECENTAGE = 50
|
const val OPENING_PERCENTAGE = 50
|
||||||
const val AUTOLOAD_NEXT_EPISODE_PRECENTAGE = 80
|
const val AUTOLOAD_NEXT_EPISODE_PERCENTAGE = 80
|
||||||
|
|
||||||
enum class PlayerEventType(val value: Int) {
|
enum class PlayerEventType(val value: Int) {
|
||||||
Stop(-1),
|
Stop(-1),
|
||||||
|
@ -266,8 +267,8 @@ class PlayerFragment : Fragment() {
|
||||||
private var simpleCache: SimpleCache? = null
|
private var simpleCache: SimpleCache? = null
|
||||||
|
|
||||||
/** Layout */
|
/** Layout */
|
||||||
private var width = Resources.getSystem().displayMetrics.heightPixels
|
private var width = Resources.getSystem().displayMetrics.widthPixels
|
||||||
private var height = Resources.getSystem().displayMetrics.widthPixels
|
private var height = Resources.getSystem().displayMetrics.heightPixels
|
||||||
private var statusBarHeight by Delegates.notNull<Int>()
|
private var statusBarHeight by Delegates.notNull<Int>()
|
||||||
private var navigationBarHeight by Delegates.notNull<Int>()
|
private var navigationBarHeight by Delegates.notNull<Int>()
|
||||||
|
|
||||||
|
@ -670,7 +671,7 @@ class PlayerFragment : Fragment() {
|
||||||
val percentage = ((position ?: exoPlayer.currentPosition) * 100 / exoPlayer.contentDuration).toInt()
|
val percentage = ((position ?: exoPlayer.currentPosition) * 100 / exoPlayer.contentDuration).toInt()
|
||||||
val hasNext = hasNextEpisode()
|
val hasNext = hasNextEpisode()
|
||||||
|
|
||||||
if (percentage >= AUTOLOAD_NEXT_EPISODE_PRECENTAGE && hasNext) {
|
if (percentage >= AUTOLOAD_NEXT_EPISODE_PERCENTAGE && hasNext) {
|
||||||
val ep =
|
val ep =
|
||||||
episodes[playerData.episodeIndex + 1]
|
episodes[playerData.episodeIndex + 1]
|
||||||
|
|
||||||
|
@ -680,7 +681,7 @@ class PlayerFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val nextEp = percentage >= OPENING_PRECENTAGE
|
val nextEp = percentage >= OPENING_PERCENTAGE
|
||||||
val isAnime =
|
val isAnime =
|
||||||
data.isAnimeBased()//(data is AnimeLoadResponse && (data.type == TvType.Anime || data.type == TvType.ONA))
|
data.isAnimeBased()//(data is AnimeLoadResponse && (data.type == TvType.Anime || data.type == TvType.ONA))
|
||||||
|
|
||||||
|
@ -868,13 +869,21 @@ class PlayerFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateLock() {
|
private fun updateLock() {
|
||||||
video_locked_img?.setImageResource(if (isLocked) R.drawable.video_locked else R.drawable.video_unlocked)
|
lock_player?.setIconResource(if (isLocked) R.drawable.video_locked else R.drawable.video_unlocked)
|
||||||
val color = if (isLocked) context?.colorFromAttribute(R.attr.colorPrimary)
|
var color = if (isLocked) context?.colorFromAttribute(R.attr.colorPrimary)
|
||||||
else Color.WHITE
|
else Color.WHITE
|
||||||
|
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
video_locked_text?.setTextColor(color)
|
lock_player?.setTextColor(color)
|
||||||
video_locked_img?.setColorFilter(color)
|
lock_player?.iconTint = ColorStateList.valueOf(color)
|
||||||
|
color = Color.argb(50, color.red, color.green, color.blue)
|
||||||
|
lock_player?.rippleColor = ColorStateList.valueOf(color)
|
||||||
|
//if(isLocked) {
|
||||||
|
// lock_player?.iconTint = ContextCompat.getColorStateList(lock_player.context, R.color.white)
|
||||||
|
//
|
||||||
|
//} else {
|
||||||
|
// lock_player?.iconTint = context?.colorFromAttribute(R.attr.colorPrimary)
|
||||||
|
//}
|
||||||
|
//lock_player?.setColorFilter(color)
|
||||||
}
|
}
|
||||||
|
|
||||||
val isClick = !isLocked
|
val isClick = !isLocked
|
||||||
|
@ -1007,6 +1016,56 @@ class PlayerFragment : Fragment() {
|
||||||
handlePlayerEvent(event.value)
|
handlePlayerEvent(event.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun handleKeyEvent(event: KeyEvent): Boolean {
|
||||||
|
event.keyCode.let { keyCode ->
|
||||||
|
when (keyCode) {
|
||||||
|
// don't allow dpad move when hidden
|
||||||
|
KeyEvent.KEYCODE_DPAD_LEFT,
|
||||||
|
KeyEvent.KEYCODE_DPAD_DOWN,
|
||||||
|
KeyEvent.KEYCODE_DPAD_UP,
|
||||||
|
KeyEvent.KEYCODE_DPAD_RIGHT,
|
||||||
|
KeyEvent.KEYCODE_DPAD_DOWN_LEFT,
|
||||||
|
KeyEvent.KEYCODE_DPAD_DOWN_RIGHT,
|
||||||
|
KeyEvent.KEYCODE_DPAD_UP_LEFT,
|
||||||
|
KeyEvent.KEYCODE_DPAD_UP_RIGHT -> {
|
||||||
|
if (!isShowing) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// netflix capture back and hide ~monke
|
||||||
|
KeyEvent.KEYCODE_BACK -> {
|
||||||
|
if (isShowing) {
|
||||||
|
onClickChange()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
when (event.action) {
|
||||||
|
KeyEvent.ACTION_DOWN -> {
|
||||||
|
when (keyCode) {
|
||||||
|
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||||
|
if (!isShowing) {
|
||||||
|
onClickChange()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//println("Keycode: $keyCode")
|
||||||
|
//showToast(
|
||||||
|
// this,
|
||||||
|
// "Got Keycode $keyCode | ${KeyEvent.keyCodeToString(keyCode)} \n ${event?.action}",
|
||||||
|
// Toast.LENGTH_LONG
|
||||||
|
//)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var lastMuteVolume = 0f
|
var lastMuteVolume = 0f
|
||||||
|
|
||||||
private fun handlePlayerEvent(event: Int) {
|
private fun handlePlayerEvent(event: Int) {
|
||||||
|
@ -1069,7 +1128,7 @@ class PlayerFragment : Fragment() {
|
||||||
requireContext().setKey(PLAYBACK_SPEED_KEY, playbackSpeed)
|
requireContext().setKey(PLAYBACK_SPEED_KEY, playbackSpeed)
|
||||||
val param = PlaybackParameters(playbackSpeed)
|
val param = PlaybackParameters(playbackSpeed)
|
||||||
exoPlayer.playbackParameters = param
|
exoPlayer.playbackParameters = param
|
||||||
player_speed_text?.text =
|
playback_speed_btt?.text =
|
||||||
getString(R.string.player_speed_text_format).format(playbackSpeed).replace(".0x", "x")
|
getString(R.string.player_speed_text_format).format(playbackSpeed).replace(".0x", "x")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1720,6 +1779,7 @@ class PlayerFragment : Fragment() {
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
MainActivity.playerEventListener = null
|
MainActivity.playerEventListener = null
|
||||||
|
MainActivity.keyEventListener = null
|
||||||
/* val lp = activity?.window?.attributes
|
/* val lp = activity?.window?.attributes
|
||||||
|
|
||||||
|
|
||||||
|
@ -1845,7 +1905,7 @@ class PlayerFragment : Fragment() {
|
||||||
|
|
||||||
player_torrent_info?.isVisible = false
|
player_torrent_info?.isVisible = false
|
||||||
//player_torrent_info?.alpha = 0f
|
//player_torrent_info?.alpha = 0f
|
||||||
println("LOADED: ${uri} or ${currentUrl}")
|
println("LOADED: $uri or $currentUrl")
|
||||||
isCurrentlyPlaying = true
|
isCurrentlyPlaying = true
|
||||||
hasUsedFirstRender = false
|
hasUsedFirstRender = false
|
||||||
|
|
||||||
|
@ -1993,7 +2053,7 @@ class PlayerFragment : Fragment() {
|
||||||
player_view?.player = exoPlayer
|
player_view?.player = exoPlayer
|
||||||
// Sets the speed
|
// Sets the speed
|
||||||
exoPlayer.playbackParameters = PlaybackParameters(playbackSpeed)
|
exoPlayer.playbackParameters = PlaybackParameters(playbackSpeed)
|
||||||
player_speed_text?.text =
|
playback_speed_btt?.text =
|
||||||
getString(R.string.player_speed_text_format).format(playbackSpeed).replace(".0x", "x")
|
getString(R.string.player_speed_text_format).format(playbackSpeed).replace(".0x", "x")
|
||||||
|
|
||||||
var hName: String? = null
|
var hName: String? = null
|
||||||
|
@ -2058,19 +2118,27 @@ class PlayerFragment : Fragment() {
|
||||||
handlePlayerEvent(eventType)
|
handlePlayerEvent(eventType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainActivity.keyEventListener = { keyEvent ->
|
||||||
|
if (keyEvent != null) {
|
||||||
|
handleKeyEvent(keyEvent)
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exoPlayer.addListener(object : Player.Listener {
|
exoPlayer.addListener(object : Player.Listener {
|
||||||
override fun onRenderedFirstFrame() {
|
override fun onRenderedFirstFrame() {
|
||||||
super.onRenderedFirstFrame()
|
super.onRenderedFirstFrame()
|
||||||
isCurrentlySkippingEp = false
|
isCurrentlySkippingEp = false
|
||||||
|
|
||||||
val height = exoPlayer.videoFormat?.height
|
val playerHeight = exoPlayer.videoFormat?.height
|
||||||
val width = exoPlayer.videoFormat?.width
|
val playerWidth = exoPlayer.videoFormat?.width
|
||||||
|
|
||||||
video_title_rez?.text =
|
video_title_rez?.text =
|
||||||
if (height == null || width == null) currentUrl?.name
|
if (playerHeight == null || playerWidth == null) currentUrl?.name
|
||||||
?: "" else
|
?: "" else
|
||||||
// if (isTorrent) "${width}x${height}" else
|
// if (isTorrent) "${width}x${height}" else
|
||||||
if (isDownloadedFile || currentUrl?.name == null) "${width}x${height}" else "${currentUrl.name} - ${width}x${height}"
|
if (isDownloadedFile || currentUrl?.name == null) "${playerWidth}x${playerHeight}" else "${currentUrl.name} - ${playerWidth}x${playerHeight}"
|
||||||
|
|
||||||
if (!hasUsedFirstRender) { // DON'T WANT TO SET MULTIPLE MESSAGES
|
if (!hasUsedFirstRender) { // DON'T WANT TO SET MULTIPLE MESSAGES
|
||||||
//&& !isTorrent
|
//&& !isTorrent
|
||||||
|
@ -2084,7 +2152,7 @@ class PlayerFragment : Fragment() {
|
||||||
changeSkip()
|
changeSkip()
|
||||||
}
|
}
|
||||||
.setLooper(Looper.getMainLooper())
|
.setLooper(Looper.getMainLooper())
|
||||||
.setPosition( /* positionMs= */exoPlayer.contentDuration * OPENING_PRECENTAGE / 100)
|
.setPosition( /* positionMs= */exoPlayer.contentDuration * OPENING_PERCENTAGE / 100)
|
||||||
// .setPayload(customPayloadData)
|
// .setPayload(customPayloadData)
|
||||||
.setDeleteAfterDelivery(false)
|
.setDeleteAfterDelivery(false)
|
||||||
.send()
|
.send()
|
||||||
|
@ -2093,7 +2161,7 @@ class PlayerFragment : Fragment() {
|
||||||
changeSkip()
|
changeSkip()
|
||||||
}
|
}
|
||||||
.setLooper(Looper.getMainLooper())
|
.setLooper(Looper.getMainLooper())
|
||||||
.setPosition( /* positionMs= */exoPlayer.contentDuration * AUTOLOAD_NEXT_EPISODE_PRECENTAGE / 100)
|
.setPosition( /* positionMs= */exoPlayer.contentDuration * AUTOLOAD_NEXT_EPISODE_PERCENTAGE / 100)
|
||||||
// .setPayload(customPayloadData)
|
// .setPayload(customPayloadData)
|
||||||
.setDeleteAfterDelivery(false)
|
.setDeleteAfterDelivery(false)
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ class SearchAdapter(
|
||||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||||
when (holder) {
|
when (holder) {
|
||||||
is CardViewHolder -> {
|
is CardViewHolder -> {
|
||||||
holder.bind(cardList[position])
|
holder.bind(cardList[position], position)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class SearchAdapter(
|
||||||
private val compactView = itemView.context.getGridIsCompact()
|
private val compactView = itemView.context.getGridIsCompact()
|
||||||
private val coverHeight: Int = if (compactView) 80.toPx else (resView.itemWidth / 0.68).roundToInt()
|
private val coverHeight: Int = if (compactView) 80.toPx else (resView.itemWidth / 0.68).roundToInt()
|
||||||
|
|
||||||
fun bind(card: SearchResponse) {
|
fun bind(card: SearchResponse, position: Int) {
|
||||||
if (!compactView) {
|
if (!compactView) {
|
||||||
cardView.apply {
|
cardView.apply {
|
||||||
layoutParams = FrameLayout.LayoutParams(
|
layoutParams = FrameLayout.LayoutParams(
|
||||||
|
@ -69,7 +69,7 @@ class SearchAdapter(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResultBuilder.bind(clickCallback, card, itemView,)
|
SearchResultBuilder.bind(clickCallback, card, itemView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,9 @@ object SearchResultBuilder {
|
||||||
clickCallback: (SearchClickCallback) -> Unit,
|
clickCallback: (SearchClickCallback) -> Unit,
|
||||||
card: SearchResponse,
|
card: SearchResponse,
|
||||||
itemView: View,
|
itemView: View,
|
||||||
nextFocusBehavior: Boolean? = null
|
nextFocusBehavior: Boolean? = null,
|
||||||
|
nextFocusUp: Int? = null,
|
||||||
|
nextFocusDown: Int? = null,
|
||||||
) {
|
) {
|
||||||
val cardView: ImageView = itemView.imageView
|
val cardView: ImageView = itemView.imageView
|
||||||
val cardText: TextView? = itemView.imageText
|
val cardText: TextView? = itemView.imageText
|
||||||
|
@ -57,6 +59,14 @@ object SearchResultBuilder {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(nextFocusUp != null) {
|
||||||
|
bg.nextFocusUpId = nextFocusUp
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nextFocusDown != null) {
|
||||||
|
bg.nextFocusDownId = nextFocusDown
|
||||||
|
}
|
||||||
|
|
||||||
when (nextFocusBehavior) {
|
when (nextFocusBehavior) {
|
||||||
true -> bg.nextFocusLeftId = bg.id
|
true -> bg.nextFocusLeftId = bg.id
|
||||||
false -> bg.nextFocusRightId = bg.id
|
false -> bg.nextFocusRightId = bg.id
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/dubColorBg"/>
|
<solid android:color="@color/dubColorBg"/>
|
||||||
<corners android:radius="@dimen/roundedImageRadius"/>
|
<corners android:radius="@dimen/rounded_image_radius"/>
|
||||||
<stroke android:color="@color/dubColor" android:width="2dp"/>
|
<stroke android:color="@color/dubColor" android:width="2dp"/>
|
||||||
</shape>
|
</shape>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="?attr/white"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
|
||||||
|
</vector>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/subColorBg"/>
|
<solid android:color="@color/subColorBg"/>
|
||||||
<corners android:radius="@dimen/roundedImageRadius"/>
|
<corners android:radius="@dimen/rounded_image_radius"/>
|
||||||
<stroke android:color="@color/subColor" android:width="2dp"/>
|
<stroke android:color="@color/subColor" android:width="2dp"/>
|
||||||
</shape>
|
</shape>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/typeColorBg"/>
|
<solid android:color="@color/typeColorBg"/>
|
||||||
<corners android:radius="@dimen/roundedImageRadius"/>
|
<corners android:radius="@dimen/rounded_image_radius"/>
|
||||||
<stroke android:color="@color/typeColor" android:width="1dp"/>
|
<stroke android:color="@color/typeColor" android:width="1dp"/>
|
||||||
</shape>
|
</shape>
|
|
@ -1,6 +1,6 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="850.39dp"
|
android:width="24dp"
|
||||||
android:height="850.39dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="850.39"
|
android:viewportWidth="850.39"
|
||||||
android:viewportHeight="850.39">
|
android:viewportHeight="850.39">
|
||||||
<path
|
<path
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="850.39dp"
|
android:width="24dp"
|
||||||
android:height="850.39dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="850.39"
|
android:viewportWidth="850.39"
|
||||||
android:viewportHeight="850.39">
|
android:viewportHeight="850.39">
|
||||||
<path
|
<path
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
||||||
android:nextFocusRight="@id/download_child_episode_download"
|
android:nextFocusRight="@id/download_child_episode_download"
|
||||||
android:nextFocusLeft="@id/download_child_episode_download"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
|
||||||
android:id="@+id/download_child_episode_holder"
|
android:id="@+id/download_child_episode_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="@color/transparent"
|
app:cardBackgroundColor="@color/transparent"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
android:foreground="@drawable/outline_drawable"
|
android:foreground="@drawable/outline_drawable"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="?attr/boxItemBackground"
|
app:cardBackgroundColor="?attr/boxItemBackground"
|
||||||
android:id="@+id/episode_holder"
|
android:id="@+id/episode_holder"
|
||||||
android:foreground="@drawable/outline_drawable"
|
android:foreground="@drawable/outline_drawable"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/download_child_toolbar"
|
android:id="@+id/download_child_toolbar"
|
||||||
android:paddingTop="@dimen/navbarHeight"
|
android:paddingTop="@dimen/navbar_height"
|
||||||
tools:title="Overlord"
|
tools:title="Overlord"
|
||||||
android:background="?attr/primaryGrayBackground"
|
android:background="?attr/primaryGrayBackground"
|
||||||
app:navigationIconTint="?attr/iconColor"
|
app:navigationIconTint="?attr/iconColor"
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
|
||||||
android:background="?attr/primaryBlackBackground"
|
android:background="?attr/primaryBlackBackground"
|
||||||
|
|
|
@ -162,6 +162,9 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:nextFocusDown="@id/home_main_poster_recyclerview"
|
android:nextFocusDown="@id/home_main_poster_recyclerview"
|
||||||
|
android:nextFocusUp="@id/nav_rail_view"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
|
||||||
android:id="@+id/home_change_api"
|
android:id="@+id/home_change_api"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_gravity="center|end"
|
android:layout_gravity="center|end"
|
||||||
|
@ -229,7 +232,7 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:nextFocusLeft="@id/home_main_info"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusUp="@id/home_main_poster_recyclerview"
|
android:nextFocusUp="@id/home_main_poster_recyclerview"
|
||||||
android:nextFocusRight="@id/home_main_info"
|
android:nextFocusRight="@id/home_main_info"
|
||||||
android:nextFocusDown="@id/home_watch_child_more_info"
|
android:nextFocusDown="@id/home_watch_child_more_info"
|
||||||
|
@ -247,7 +250,7 @@
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:nextFocusLeft="@id/home_main_play"
|
android:nextFocusLeft="@id/home_main_play"
|
||||||
android:nextFocusUp="@id/home_main_poster_recyclerview"
|
android:nextFocusUp="@id/home_main_poster_recyclerview"
|
||||||
android:nextFocusRight="@id/home_main_play"
|
android:nextFocusRight="@id/home_change_api"
|
||||||
android:nextFocusDown="@id/home_watch_child_more_info"
|
android:nextFocusDown="@id/home_watch_child_more_info"
|
||||||
|
|
||||||
style="@style/BlackButton"
|
style="@style/BlackButton"
|
||||||
|
@ -275,6 +278,7 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusUp="@id/home_main_info"
|
android:nextFocusUp="@id/home_main_info"
|
||||||
android:nextFocusDown="@id/home_watch_child_recyclerview"
|
android:nextFocusDown="@id/home_watch_child_recyclerview"
|
||||||
|
|
||||||
|
@ -322,6 +326,7 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
android:nextFocusForward="@id/home_bookmarked_child_recyclerview"
|
android:nextFocusForward="@id/home_bookmarked_child_recyclerview"
|
||||||
|
|
||||||
|
@ -331,6 +336,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
|
||||||
android:tint="?attr/textColor"
|
android:tint="?attr/textColor"
|
||||||
|
@ -374,6 +380,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
android:id="@+id/home_master_recycler"
|
android:id="@+id/home_master_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/result_poster_holder"
|
android:id="@+id/result_poster_holder"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="140dp">
|
android:layout_height="140dp">
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
tools:context=".ui.search.SearchFragment"
|
tools:context=".ui.search.SearchFragment"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="?attr/primaryGrayBackground"
|
android:background="?attr/primaryGrayBackground"
|
||||||
android:layout_marginTop="@dimen/navbarHeight">
|
android:layout_marginTop="@dimen/navbar_height">
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
|
@ -23,8 +23,9 @@
|
||||||
android:layout_marginEnd="30dp"
|
android:layout_marginEnd="30dp"
|
||||||
android:layout_height="30dp">
|
android:layout_height="30dp">
|
||||||
<androidx.appcompat.widget.SearchView
|
<androidx.appcompat.widget.SearchView
|
||||||
|
android:nextFocusUp="@id/nav_rail_view"
|
||||||
android:nextFocusRight="@id/search_filter"
|
android:nextFocusRight="@id/search_filter"
|
||||||
android:nextFocusLeft="@id/search_filter"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusDown="@id/cardSpace"
|
android:nextFocusDown="@id/cardSpace"
|
||||||
|
|
||||||
android:imeOptions="actionSearch"
|
android:imeOptions="actionSearch"
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
app:iconifiedByDefault="false"
|
app:iconifiedByDefault="false"
|
||||||
tools:ignore="RtlSymmetry">
|
tools:ignore="RtlSymmetry">
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
<androidx.core.widget.ContentLoadingProgressBar
|
<androidx.core.widget.ContentLoadingProgressBar
|
||||||
android:id="@+id/search_loading_bar"
|
android:id="@+id/search_loading_bar"
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
</androidx.appcompat.widget.SearchView>
|
</androidx.appcompat.widget.SearchView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:nextFocusUp="@id/nav_rail_view"
|
||||||
android:nextFocusRight="@id/main_search"
|
android:nextFocusRight="@id/main_search"
|
||||||
android:nextFocusLeft="@id/main_search"
|
android:nextFocusLeft="@id/main_search"
|
||||||
android:nextFocusDown="@id/cardSpace"
|
android:nextFocusDown="@id/cardSpace"
|
||||||
|
@ -73,11 +76,11 @@
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
app:tint="?attr/textColor"
|
app:tint="?attr/textColor"
|
||||||
android:contentDescription="@string/change_providers_img_des">
|
android:contentDescription="@string/change_providers_img_des">
|
||||||
<requestFocus/>
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<com.lagradost.cloudstream3.ui.AutofitRecyclerView
|
<com.lagradost.cloudstream3.ui.AutofitRecyclerView
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
|
||||||
android:background="?attr/primaryBlackBackground"
|
android:background="?attr/primaryBlackBackground"
|
||||||
|
@ -93,6 +96,7 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
/>
|
/>
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
|
||||||
android:background="?attr/primaryBlackBackground"
|
android:background="?attr/primaryBlackBackground"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:layout_height="234dp"
|
android:layout_height="234dp"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:id="@+id/backgroundCard"
|
android:id="@+id/backgroundCard"
|
||||||
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:layout_height="180dp"
|
android:layout_height="180dp"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:id="@+id/backgroundCard"
|
android:id="@+id/backgroundCard"
|
||||||
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:nextFocusDown="@id/home_child_recyclerview"
|
|
||||||
|
|
||||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:id="@+id/home_child_more_info"
|
android:id="@+id/home_child_more_info"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
@ -32,6 +30,7 @@
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:nextFocusUp="@id/home_child_more_info"
|
||||||
android:paddingHorizontal="5dp"
|
android:paddingHorizontal="5dp"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
|
||||||
|
|
|
@ -490,315 +490,66 @@
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
>
|
>
|
||||||
<androidx.cardview.widget.CardView
|
<com.google.android.material.button.MaterialButton
|
||||||
android:nextFocusLeft="@id/skip_episode"
|
android:nextFocusLeft="@id/skip_episode"
|
||||||
android:nextFocusRight="@id/resize_player"
|
android:nextFocusRight="@id/resize_player"
|
||||||
|
|
||||||
android:id="@+id/lock_player"
|
android:id="@+id/lock_player"
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
app:iconSize="30dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
card_view:cardBackgroundColor="@color/transparent"
|
|
||||||
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
card_view:cardElevation="0dp"
|
|
||||||
tools:visibility="visible"
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:id="@+id/video_locked_img"
|
|
||||||
android:src="@drawable/video_locked"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/video_lock"
|
android:text="@string/video_lock"
|
||||||
android:gravity="center"
|
app:icon="@drawable/video_locked"
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:id="@+id/video_locked_text"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
style="@style/VideoButton"/>
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/lock_holder"
|
android:id="@+id/lock_holder"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
android:nextFocusLeft="@id/lock_player"
|
android:nextFocusLeft="@id/lock_player"
|
||||||
android:nextFocusRight="@id/playback_speed_btt"
|
android:nextFocusRight="@id/playback_speed_btt"
|
||||||
|
|
||||||
android:id="@+id/resize_player"
|
android:id="@+id/resize_player"
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
card_view:cardBackgroundColor="@color/transparent"
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
card_view:cardElevation="0dp"
|
|
||||||
tools:visibility="visible"
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:src="@drawable/ic_baseline_aspect_ratio_24"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/video_aspect_ratio_resize"
|
android:text="@string/video_aspect_ratio_resize"
|
||||||
android:gravity="center"
|
app:icon="@drawable/ic_baseline_aspect_ratio_24"
|
||||||
android:paddingStart="10dp"
|
style="@style/VideoButton"/>
|
||||||
android:paddingEnd="10dp"
|
<com.google.android.material.button.MaterialButton
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:nextFocusLeft="@id/resize_player"
|
android:nextFocusLeft="@id/resize_player"
|
||||||
android:nextFocusRight="@id/sources_btt"
|
android:nextFocusRight="@id/sources_btt"
|
||||||
|
|
||||||
android:id="@+id/playback_speed_btt"
|
android:id="@+id/playback_speed_btt"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
app:cardBackgroundColor="@color/transparent"
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
app:cardElevation="0dp"
|
|
||||||
|
|
||||||
>
|
tools:text="Speed"
|
||||||
<LinearLayout
|
app:icon="@drawable/ic_baseline_speed_24"
|
||||||
android:layout_width="wrap_content"
|
style="@style/VideoButton"/>
|
||||||
android:layout_height="match_parent"
|
<com.google.android.material.button.MaterialButton
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:src="@drawable/ic_baseline_speed_24"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
>
|
|
||||||
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="Speed"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:id="@+id/player_speed_text"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
|
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:nextFocusLeft="@id/playback_speed_btt"
|
android:nextFocusLeft="@id/playback_speed_btt"
|
||||||
android:nextFocusRight="@id/skip_op"
|
android:nextFocusRight="@id/skip_op"
|
||||||
|
|
||||||
android:id="@+id/sources_btt"
|
android:id="@+id/sources_btt"
|
||||||
|
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
card_view:cardBackgroundColor="@color/transparent"
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
card_view:cardElevation="0dp"
|
|
||||||
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:src="@drawable/ic_baseline_playlist_play_24"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/video_source"
|
android:text="@string/video_source"
|
||||||
android:gravity="center"
|
app:icon="@drawable/ic_baseline_playlist_play_24"
|
||||||
android:paddingStart="10dp"
|
style="@style/VideoButton"/>
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:nextFocusLeft="@id/sources_btt"
|
android:nextFocusLeft="@id/sources_btt"
|
||||||
android:nextFocusRight="@id/skip_episode"
|
android:nextFocusRight="@id/skip_episode"
|
||||||
android:id="@+id/skip_op"
|
android:id="@+id/skip_op"
|
||||||
|
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
card_view:cardBackgroundColor="@color/transparent"
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
card_view:cardElevation="0dp"
|
|
||||||
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:src="@drawable/exo_controls_fastforward"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/video_skip_op"
|
android:text="@string/video_skip_op"
|
||||||
android:gravity="start|center"
|
app:icon="@drawable/ic_baseline_fast_forward_24"
|
||||||
android:paddingStart="10dp"
|
style="@style/VideoButton"/>
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:nextFocusLeft="@id/skip_op"
|
android:nextFocusLeft="@id/skip_op"
|
||||||
android:nextFocusRight="@id/lock_player"
|
android:nextFocusRight="@id/lock_player"
|
||||||
|
|
||||||
android:id="@+id/skip_episode"
|
android:id="@+id/skip_episode"
|
||||||
|
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
card_view:cardBackgroundColor="@color/transparent"
|
|
||||||
android:foreground="@drawable/video_bottom_button"
|
|
||||||
card_view:cardElevation="0dp"
|
|
||||||
>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:src="@drawable/ic_baseline_skip_next_24"
|
|
||||||
app:tint="@android:color/white"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
</ImageView>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/next_episode"
|
android:text="@string/next_episode"
|
||||||
|
app:icon="@drawable/ic_baseline_skip_next_24"
|
||||||
android:gravity="start|center"
|
style="@style/VideoButton"
|
||||||
android:paddingStart="10dp"
|
/>
|
||||||
|
|
||||||
android:textSize="10sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
>
|
|
||||||
</TextView>
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
<View
|
<View
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="@color/transparent"
|
app:cardBackgroundColor="@color/transparent"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
android:foreground="@drawable/outline_drawable"
|
android:foreground="@drawable/outline_drawable"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="?attr/boxItemBackground"
|
app:cardBackgroundColor="?attr/boxItemBackground"
|
||||||
|
|
||||||
android:foreground="@drawable/outline_drawable"
|
android:foreground="@drawable/outline_drawable"
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="?attr/boxItemBackground"
|
app:cardBackgroundColor="?attr/boxItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
>
|
>
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:layout_width="54dp"
|
android:layout_width="54dp"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:id="@+id/backgroundCard"
|
android:id="@+id/backgroundCard"
|
||||||
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
app:cardBackgroundColor="?attr/primaryGrayBackground"
|
||||||
>
|
>
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
app:cardBackgroundColor="?attr/boxItemBackground"
|
app:cardBackgroundColor="?attr/boxItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
>
|
>
|
||||||
<!-- USING CROP RATIO (182/268), centerCrop for fill -->
|
<!-- USING CROP RATIO (182/268), centerCrop for fill -->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
app:cardCornerRadius="@dimen/roundedImageRadius"
|
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
|
@ -114,14 +114,14 @@
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="themes_names">
|
<string-array name="themes_names">
|
||||||
<item>Normal</item>
|
|
||||||
<item>Dark</item>
|
<item>Dark</item>
|
||||||
|
<item>Gray</item>
|
||||||
<item>Amoled</item>
|
<item>Amoled</item>
|
||||||
<item>Flashbang</item>
|
<item>Flashbang</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="themes_names_values">
|
<string-array name="themes_names_values">
|
||||||
<item>Black</item>
|
|
||||||
<item>AmoledLight</item>
|
<item>AmoledLight</item>
|
||||||
|
<item>Black</item>
|
||||||
<item>Amoled</item>
|
<item>Amoled</item>
|
||||||
<item>Light</item>
|
<item>Light</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
<color name="typeColor">#3BF585</color>
|
<color name="typeColor">#3BF585</color>
|
||||||
<color name="typeColorBg">#803BF585</color>
|
<color name="typeColorBg">#803BF585</color>
|
||||||
|
|
||||||
<color name="video_ripple">#73FFFFFF</color>
|
<color name="video_ripple">#80FFFFFF</color>
|
||||||
|
<color name="video_button_ripple">#32FFFFFF</color>
|
||||||
|
|
||||||
<color name="black_overlay">#66000000</color>
|
<color name="black_overlay">#66000000</color>
|
||||||
<color name="darkBarTransparent">#C0121212</color>
|
<color name="darkBarTransparent">#C0121212</color>
|
||||||
<color name="darkBar">#121212</color>
|
<color name="darkBar">#121212</color>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||||
<dimen name="roundedImageRadius">5dp</dimen>
|
<dimen name="rounded_image_radius">5dp</dimen>
|
||||||
<dimen name="navbarHeight">0dp</dimen>
|
<dimen name="navbar_height">0dp</dimen>
|
||||||
<dimen name="card_corner_radius">2dp</dimen>
|
<dimen name="card_corner_radius">2dp</dimen>
|
||||||
<dimen name="result_padding">15dp</dimen>
|
<dimen name="result_padding">15dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -311,6 +311,28 @@
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="VideoButton">
|
||||||
|
<item name="android:stateListAnimator">@null</item>
|
||||||
|
<item name="strokeColor">@color/transparent</item>
|
||||||
|
<item name="backgroundTint">@color/transparent</item>
|
||||||
|
<item name="rippleColor">@color/video_button_ripple</item>
|
||||||
|
<item name="android:shadowColor">@color/transparent</item>
|
||||||
|
|
||||||
|
<item name="cornerRadius">3dp</item>
|
||||||
|
<item name="iconTint">@color/white</item>
|
||||||
|
<item name="textColor">@color/white</item>
|
||||||
|
<item name="android:textColor">@color/white</item>
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:layout_height">45dp</item>
|
||||||
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:layout_gravity">center</item>
|
||||||
|
<item name="textAllCaps">false</item>
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:textSize">10sp</item>
|
||||||
|
<item name="android:layout_marginStart">10dp</item>
|
||||||
|
<item name="android:layout_marginEnd">10dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!--@color/white ?attr/colorPrimary-->
|
<!--@color/white ?attr/colorPrimary-->
|
||||||
<!--CHECK ?attr/darkBackground ?attr/colorPrimary-->
|
<!--CHECK ?attr/darkBackground ?attr/colorPrimary-->
|
||||||
<!-- CHROMECAST -->
|
<!-- CHROMECAST -->
|
||||||
|
|
Loading…
Reference in a new issue