mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
changed UI a bit for flashbang + fixed crash inf loading bug
This commit is contained in:
parent
ecd529f73b
commit
3ac462ae96
19 changed files with 252 additions and 185 deletions
|
@ -51,7 +51,7 @@ android {
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
|
|
||||||
versionCode = 59
|
versionCode = 59
|
||||||
versionName = "4.1.2"
|
versionName = "4.1.3"
|
||||||
|
|
||||||
resValue("string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}")
|
resValue("string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}")
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ var app = Requests(responseParser = object : ResponseParser {
|
||||||
class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "MAINACT"
|
const val TAG = "MAINACT"
|
||||||
|
var lastError: String? = null
|
||||||
/**
|
/**
|
||||||
* Setting this will automatically enter the query in the search
|
* Setting this will automatically enter the query in the search
|
||||||
* next time the search fragment is opened.
|
* next time the search fragment is opened.
|
||||||
|
@ -599,22 +599,9 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
||||||
val start = System.currentTimeMillis()
|
|
||||||
try {
|
|
||||||
val response = CommonActivity.dispatchKeyEvent(this, event)
|
val response = CommonActivity.dispatchKeyEvent(this, event)
|
||||||
|
|
||||||
if (response != null)
|
if (response != null)
|
||||||
return response
|
return response
|
||||||
} finally {
|
|
||||||
debugAssert({
|
|
||||||
val end = System.currentTimeMillis()
|
|
||||||
val delta = end - start
|
|
||||||
delta > 100
|
|
||||||
}) {
|
|
||||||
"Took over 100ms to navigate, smth is VERY wrong"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.dispatchKeyEvent(event)
|
return super.dispatchKeyEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1054,10 +1041,11 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
|
||||||
val errorFile = filesDir.resolve("last_error")
|
val errorFile = filesDir.resolve("last_error")
|
||||||
var lastError: String? = null
|
|
||||||
if (errorFile.exists() && errorFile.isFile) {
|
if (errorFile.exists() && errorFile.isFile) {
|
||||||
lastError = errorFile.readText(Charset.defaultCharset())
|
lastError = errorFile.readText(Charset.defaultCharset())
|
||||||
errorFile.delete()
|
errorFile.delete()
|
||||||
|
} else {
|
||||||
|
lastError = null
|
||||||
}
|
}
|
||||||
|
|
||||||
val settingsForProvider = SettingsJson()
|
val settingsForProvider = SettingsJson()
|
||||||
|
@ -1167,16 +1155,16 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Automatically download not existing plugins, using mode specified.
|
//Automatically download not existing plugins, using mode specified.
|
||||||
val auto_download_plugin = AutoDownloadMode.getEnum(
|
val autoDownloadPlugin = AutoDownloadMode.getEnum(
|
||||||
settingsManager.getInt(
|
settingsManager.getInt(
|
||||||
getString(R.string.auto_download_plugins_key),
|
getString(R.string.auto_download_plugins_key),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
) ?: AutoDownloadMode.Disable
|
) ?: AutoDownloadMode.Disable
|
||||||
if (auto_download_plugin != AutoDownloadMode.Disable) {
|
if (autoDownloadPlugin != AutoDownloadMode.Disable) {
|
||||||
PluginManager.downloadNotExistingPluginsAndLoad(
|
PluginManager.downloadNotExistingPluginsAndLoad(
|
||||||
this@MainActivity,
|
this@MainActivity,
|
||||||
auto_download_plugin
|
autoDownloadPlugin
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -513,9 +513,13 @@ class HomeFragment : Fragment() {
|
||||||
fixGrid()
|
fixGrid()
|
||||||
|
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
homeChangeApiLoading.setOnClickListener(apiChangeClickListener)
|
//homeChangeApiLoading.setOnClickListener(apiChangeClickListener)
|
||||||
//homeChangeApiLoading.setOnClickListener(apiChangeClickListener)
|
//homeChangeApiLoading.setOnClickListener(apiChangeClickListener)
|
||||||
homeApiFab.setOnClickListener(apiChangeClickListener)
|
homeApiFab.setOnClickListener(apiChangeClickListener)
|
||||||
|
homeChangeApi.setOnClickListener(apiChangeClickListener)
|
||||||
|
homeSwitchAccount.setOnClickListener { v ->
|
||||||
|
DataStoreHelper.showWhoIsWatching(v?.context ?: return@setOnClickListener)
|
||||||
|
}
|
||||||
homeRandom.setOnClickListener {
|
homeRandom.setOnClickListener {
|
||||||
if (listHomepageItems.isNotEmpty()) {
|
if (listHomepageItems.isNotEmpty()) {
|
||||||
activity.loadSearchResult(listHomepageItems.random())
|
activity.loadSearchResult(listHomepageItems.random())
|
||||||
|
@ -527,21 +531,9 @@ class HomeFragment : Fragment() {
|
||||||
mutableListOf(),
|
mutableListOf(),
|
||||||
homeViewModel
|
homeViewModel
|
||||||
)
|
)
|
||||||
fixPaddingStatusbar(homeLoadingStatusbar)
|
//fixPaddingStatusbar(homeLoadingStatusbar)
|
||||||
|
|
||||||
if (isTvSettings()) {
|
homeApiFab.isVisible = !isTvSettings()
|
||||||
homeApiFab.isVisible = false
|
|
||||||
if (isTrueTvSettings()) {
|
|
||||||
homeChangeApiLoading.isVisible = true
|
|
||||||
homeChangeApiLoading.isFocusable = true
|
|
||||||
homeChangeApiLoading.isFocusableInTouchMode = true
|
|
||||||
}
|
|
||||||
// home_bookmark_select?.isFocusable = true
|
|
||||||
// home_bookmark_select?.isFocusableInTouchMode = true
|
|
||||||
} else {
|
|
||||||
homeApiFab.isVisible = true
|
|
||||||
homeChangeApiLoading.isVisible = false
|
|
||||||
}
|
|
||||||
|
|
||||||
homeMasterRecycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
homeMasterRecycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
|
@ -574,6 +566,7 @@ class HomeFragment : Fragment() {
|
||||||
observe(homeViewModel.apiName) { apiName ->
|
observe(homeViewModel.apiName) { apiName ->
|
||||||
currentApiName = apiName
|
currentApiName = apiName
|
||||||
binding?.homeApiFab?.text = apiName
|
binding?.homeApiFab?.text = apiName
|
||||||
|
binding?.homeChangeApi?.text = apiName
|
||||||
}
|
}
|
||||||
|
|
||||||
observe(homeViewModel.page) { data ->
|
observe(homeViewModel.page) { data ->
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.ui.home
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
|
||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
|
@ -13,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.viewbinding.ViewBinding
|
import androidx.viewbinding.ViewBinding
|
||||||
import androidx.viewpager2.widget.ViewPager2
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
import com.google.android.material.chip.Chip
|
import com.google.android.material.chip.Chip
|
||||||
import com.google.android.material.chip.ChipDrawable
|
|
||||||
import com.google.android.material.chip.ChipGroup
|
import com.google.android.material.chip.ChipGroup
|
||||||
import com.lagradost.cloudstream3.APIHolder.getId
|
import com.lagradost.cloudstream3.APIHolder.getId
|
||||||
import com.lagradost.cloudstream3.AcraApplication.Companion.getActivity
|
import com.lagradost.cloudstream3.AcraApplication.Companion.getActivity
|
||||||
|
@ -41,10 +39,9 @@ import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSet
|
||||||
import com.lagradost.cloudstream3.utils.DataStoreHelper
|
import com.lagradost.cloudstream3.utils.DataStoreHelper
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showOptionSelectStringRes
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showOptionSelectStringRes
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
|
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbarMargin
|
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbarMargin
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbarView
|
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbarView
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
import com.lagradost.cloudstream3.utils.UIHelper.populateChips
|
||||||
|
|
||||||
class HomeParentItemAdapterPreview(
|
class HomeParentItemAdapterPreview(
|
||||||
items: MutableList<HomeViewModel.ExpandableHomepageList>,
|
items: MutableList<HomeViewModel.ExpandableHomepageList>,
|
||||||
|
@ -245,7 +242,11 @@ class HomeParentItemAdapterPreview(
|
||||||
|
|
||||||
private val previewViewpager: ViewPager2 =
|
private val previewViewpager: ViewPager2 =
|
||||||
itemView.findViewById(R.id.home_preview_viewpager)
|
itemView.findViewById(R.id.home_preview_viewpager)
|
||||||
private val previewHeader: FrameLayout = itemView.findViewById(R.id.home_preview)
|
|
||||||
|
private val previewViewpagerText: ViewGroup =
|
||||||
|
itemView.findViewById(R.id.home_preview_viewpager_text)
|
||||||
|
|
||||||
|
// private val previewHeader: FrameLayout = itemView.findViewById(R.id.home_preview)
|
||||||
private var resumeHolder: View = itemView.findViewById(R.id.home_watch_holder)
|
private var resumeHolder: View = itemView.findViewById(R.id.home_watch_holder)
|
||||||
private var resumeRecyclerView: RecyclerView =
|
private var resumeRecyclerView: RecyclerView =
|
||||||
itemView.findViewById(R.id.home_watch_child_recyclerview)
|
itemView.findViewById(R.id.home_watch_child_recyclerview)
|
||||||
|
@ -254,7 +255,7 @@ class HomeParentItemAdapterPreview(
|
||||||
itemView.findViewById(R.id.home_bookmarked_child_recyclerview)
|
itemView.findViewById(R.id.home_bookmarked_child_recyclerview)
|
||||||
|
|
||||||
private var homeAccount: View? =
|
private var homeAccount: View? =
|
||||||
itemView.findViewById(R.id.home_switch_account)
|
itemView.findViewById(R.id.home_preview_switch_account)
|
||||||
|
|
||||||
private var topPadding : View? = itemView.findViewById(R.id.home_padding)
|
private var topPadding : View? = itemView.findViewById(R.id.home_padding)
|
||||||
|
|
||||||
|
@ -282,26 +283,8 @@ class HomeParentItemAdapterPreview(
|
||||||
item.plot ?: ""
|
item.plot ?: ""
|
||||||
|
|
||||||
homePreviewText.text = item.name
|
homePreviewText.text = item.name
|
||||||
homePreviewTags.apply {
|
populateChips(homePreviewTags,item.tags ?: emptyList(), R.style.ChipFilledSemiTransparent)
|
||||||
removeAllViews()
|
|
||||||
item.tags?.forEach { tag ->
|
|
||||||
val chip = Chip(context)
|
|
||||||
val chipDrawable =
|
|
||||||
ChipDrawable.createFromAttributes(
|
|
||||||
context,
|
|
||||||
null,
|
|
||||||
0,
|
|
||||||
R.style.ChipFilledSemiTransparent
|
|
||||||
)
|
|
||||||
chip.setChipDrawable(chipDrawable)
|
|
||||||
chip.text = tag
|
|
||||||
chip.isChecked = false
|
|
||||||
chip.isCheckable = false
|
|
||||||
chip.isFocusable = false
|
|
||||||
chip.isClickable = false
|
|
||||||
addView(chip)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
homePreviewTags.isGone =
|
homePreviewTags.isGone =
|
||||||
item.tags.isNullOrEmpty()
|
item.tags.isNullOrEmpty()
|
||||||
|
|
||||||
|
@ -324,7 +307,7 @@ class HomeParentItemAdapterPreview(
|
||||||
|
|
||||||
}
|
}
|
||||||
(binding as? FragmentHomeHeadBinding)?.apply {
|
(binding as? FragmentHomeHeadBinding)?.apply {
|
||||||
homePreviewImage.setImage(item.posterUrl, item.posterHeaders)
|
//homePreviewImage.setImage(item.posterUrl, item.posterHeaders)
|
||||||
|
|
||||||
homePreviewPlay.setOnClickListener { view ->
|
homePreviewPlay.setOnClickListener { view ->
|
||||||
viewModel.click(
|
viewModel.click(
|
||||||
|
@ -402,7 +385,6 @@ class HomeParentItemAdapterPreview(
|
||||||
if (binding is FragmentHomeHeadTvBinding) {
|
if (binding is FragmentHomeHeadTvBinding) {
|
||||||
observe(viewModel.apiName) { name ->
|
observe(viewModel.apiName) { name ->
|
||||||
binding.homePreviewChangeApi.text = name
|
binding.homePreviewChangeApi.text = name
|
||||||
binding.homePreviewChangeApi2.text = name
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
observe(viewModel.resumeWatching) {
|
observe(viewModel.resumeWatching) {
|
||||||
|
@ -468,11 +450,6 @@ class HomeParentItemAdapterPreview(
|
||||||
viewModel.loadAndCancel(api, forceReload = true, fromUI = true)
|
viewModel.loadAndCancel(api, forceReload = true, fromUI = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
homePreviewChangeApi2.setOnClickListener { view ->
|
|
||||||
view.context.selectHomepage(viewModel.repo?.name) { api ->
|
|
||||||
viewModel.loadAndCancel(api, forceReload = true, fromUI = true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This makes the hidden next buttons only available when on the info button
|
// This makes the hidden next buttons only available when on the info button
|
||||||
// Otherwise you might be able to go to the next item without being at the info button
|
// Otherwise you might be able to go to the next item without being at the info button
|
||||||
|
@ -517,10 +494,6 @@ class HomeParentItemAdapterPreview(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updatePreview(preview: Resource<Pair<Boolean, List<LoadResponse>>>) {
|
private fun updatePreview(preview: Resource<Pair<Boolean, List<LoadResponse>>>) {
|
||||||
if (binding is FragmentHomeHeadTvBinding) {
|
|
||||||
binding.homePreviewChangeApi2.isGone = preview is Resource.Success
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preview is Resource.Success) {
|
if (preview is Resource.Success) {
|
||||||
homeNonePadding.apply {
|
homeNonePadding.apply {
|
||||||
val params = layoutParams
|
val params = layoutParams
|
||||||
|
@ -545,14 +518,18 @@ class HomeParentItemAdapterPreview(
|
||||||
previewViewpager.fakeDragBy(1f)
|
previewViewpager.fakeDragBy(1f)
|
||||||
previewViewpager.endFakeDrag()
|
previewViewpager.endFakeDrag()
|
||||||
previewCallback.onPageSelected(0)
|
previewCallback.onPageSelected(0)
|
||||||
previewHeader.isVisible = true
|
previewViewpager.isVisible = true
|
||||||
|
previewViewpagerText.isVisible = true
|
||||||
|
//previewHeader.isVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
previewAdapter.setItems(listOf(), false)
|
previewAdapter.setItems(listOf(), false)
|
||||||
previewViewpager.setCurrentItem(0, false)
|
previewViewpager.setCurrentItem(0, false)
|
||||||
previewHeader.isVisible = false
|
previewViewpager.isVisible = false
|
||||||
|
previewViewpagerText.isVisible = false
|
||||||
|
//previewHeader.isVisible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.lagradost.cloudstream3.HomePageList
|
||||||
import com.lagradost.cloudstream3.LoadResponse
|
import com.lagradost.cloudstream3.LoadResponse
|
||||||
import com.lagradost.cloudstream3.MainAPI
|
import com.lagradost.cloudstream3.MainAPI
|
||||||
import com.lagradost.cloudstream3.MainActivity
|
import com.lagradost.cloudstream3.MainActivity
|
||||||
|
import com.lagradost.cloudstream3.MainActivity.Companion.lastError
|
||||||
import com.lagradost.cloudstream3.SearchResponse
|
import com.lagradost.cloudstream3.SearchResponse
|
||||||
import com.lagradost.cloudstream3.amap
|
import com.lagradost.cloudstream3.amap
|
||||||
import com.lagradost.cloudstream3.mvvm.Resource
|
import com.lagradost.cloudstream3.mvvm.Resource
|
||||||
|
@ -484,7 +485,7 @@ class HomeViewModel : ViewModel() {
|
||||||
} else if (api == null) {
|
} else if (api == null) {
|
||||||
// API is not found aka not loaded or removed, post the loading
|
// API is not found aka not loaded or removed, post the loading
|
||||||
// progress if waiting for plugins, otherwise nothing
|
// progress if waiting for plugins, otherwise nothing
|
||||||
if(PluginManager.loadedLocalPlugins) {
|
if(PluginManager.loadedLocalPlugins || PluginManager.checkSafeModeFile() || lastError != null) {
|
||||||
loadAndCancel(noneApi)
|
loadAndCancel(noneApi)
|
||||||
} else {
|
} else {
|
||||||
_page.postValue(Resource.Loading())
|
_page.postValue(Resource.Loading())
|
||||||
|
|
|
@ -177,7 +177,7 @@ class SettingsUpdates : PreferenceFragmentCompat() {
|
||||||
val prefNames = resources.getStringArray(R.array.auto_download_plugin)
|
val prefNames = resources.getStringArray(R.array.auto_download_plugin)
|
||||||
val prefValues = enumValues<AutoDownloadMode>().sortedBy { x -> x.value }.map { x -> x.value }
|
val prefValues = enumValues<AutoDownloadMode>().sortedBy { x -> x.value }.map { x -> x.value }
|
||||||
|
|
||||||
val current = settingsManager.getInt(getString(R.string.auto_download_plugins_pref), 0)
|
val current = settingsManager.getInt(getString(R.string.auto_download_plugins_key), 0)
|
||||||
|
|
||||||
activity?.showBottomDialog(
|
activity?.showBottomDialog(
|
||||||
prefNames.toList(),
|
prefNames.toList(),
|
||||||
|
@ -185,7 +185,7 @@ class SettingsUpdates : PreferenceFragmentCompat() {
|
||||||
getString(R.string.automatic_plugin_download_mode_title),
|
getString(R.string.automatic_plugin_download_mode_title),
|
||||||
true,
|
true,
|
||||||
{}) {
|
{}) {
|
||||||
settingsManager.edit().putInt(getString(R.string.auto_download_plugins_pref), prefValues[it]).apply()
|
settingsManager.edit().putInt(getString(R.string.auto_download_plugins_key), prefValues[it]).apply()
|
||||||
(context ?: AcraApplication.context)?.let { ctx -> app.initClient(ctx) }
|
(context ?: AcraApplication.context)?.let { ctx -> app.initClient(ctx) }
|
||||||
}
|
}
|
||||||
return@setOnPreferenceClickListener true
|
return@setOnPreferenceClickListener true
|
||||||
|
|
|
@ -24,6 +24,7 @@ import androidx.annotation.AttrRes
|
||||||
import androidx.annotation.ColorInt
|
import androidx.annotation.ColorInt
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.annotation.IdRes
|
import androidx.annotation.IdRes
|
||||||
|
import androidx.annotation.StyleRes
|
||||||
import androidx.appcompat.view.ContextThemeWrapper
|
import androidx.appcompat.view.ContextThemeWrapper
|
||||||
import androidx.appcompat.view.menu.MenuBuilder
|
import androidx.appcompat.view.menu.MenuBuilder
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
|
@ -81,7 +82,7 @@ object UIHelper {
|
||||||
|| Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
|
|| Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun populateChips(view: ChipGroup?, tags: List<String>) {
|
fun populateChips(view: ChipGroup?, tags: List<String>, @StyleRes style : Int = R.style.ChipFilled) {
|
||||||
if (view == null) return
|
if (view == null) return
|
||||||
view.removeAllViews()
|
view.removeAllViews()
|
||||||
val context = view.context ?: return
|
val context = view.context ?: return
|
||||||
|
@ -92,7 +93,7 @@ object UIHelper {
|
||||||
context,
|
context,
|
||||||
null,
|
null,
|
||||||
0,
|
0,
|
||||||
R.style.ChipFilled
|
style
|
||||||
)
|
)
|
||||||
chip.setChipDrawable(chipDrawable)
|
chip.setChipDrawable(chipDrawable)
|
||||||
chip.text = tag
|
chip.text = tag
|
||||||
|
@ -100,7 +101,7 @@ object UIHelper {
|
||||||
chip.isCheckable = false
|
chip.isCheckable = false
|
||||||
chip.isFocusable = false
|
chip.isFocusable = false
|
||||||
chip.isClickable = false
|
chip.isClickable = false
|
||||||
chip.setTextColor(context.colorFromAttribute(R.attr.textColor))
|
chip.setTextColor(context.colorFromAttribute(R.attr.white))
|
||||||
view.addView(chip)
|
view.addView(chip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
app/src/main/res/color/player_on_button_tv_attr.xml
Normal file
5
app/src/main/res/color/player_on_button_tv_attr.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_focused="true" android:color="?attr/black"/>
|
||||||
|
<item android:color="?attr/white"/>
|
||||||
|
</selector>
|
4
app/src/main/res/color/white_attr_20.xml
Normal file
4
app/src/main/res/color/white_attr_20.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?attr/white" android:alpha="0.2" />
|
||||||
|
</selector>
|
15
app/src/main/res/drawable/player_button_tv_attr.xml
Normal file
15
app/src/main/res/drawable/player_button_tv_attr.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="?attr/white" />
|
||||||
|
<corners android:radius="3dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white_attr_20" />
|
||||||
|
<corners android:radius="3dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="?attr/white" />
|
||||||
|
<corners android:radius="3dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
|
@ -13,7 +13,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="gone">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
|
@ -92,22 +92,40 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.facebook.shimmer.ShimmerFrameLayout>
|
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
android:id="@+id/home_loading_statusbar"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
||||||
android:layout_height="70dp">
|
android:layout_gravity="end"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/home_change_api"
|
||||||
|
style="@style/RegularButtonTV"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="@drawable/player_button_tv_attr_no_bg"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
android:nextFocusRight="@id/home_switch_account"
|
||||||
|
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/home_change_api_loading"
|
android:id="@+id/home_switch_account"
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_gravity="center_vertical|end"
|
|
||||||
|
|
||||||
android:layout_margin="10dp"
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/home_change_provider_img_des"
|
android:contentDescription="@string/account"
|
||||||
android:src="@drawable/ic_baseline_keyboard_arrow_down_24" />
|
android:nextFocusLeft="@id/home_search"
|
||||||
</FrameLayout>
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_outline_account_circle_24" />
|
||||||
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -160,7 +178,8 @@
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/homepage_parent" />
|
tools:listitem="@layout/homepage_parent"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/home_api_fab"
|
android:id="@+id/home_api_fab"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
android:layout_height="0dp" />
|
android:layout_height="0dp" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/home_preview"
|
android:id="@+id/home_preview_viewpager_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="500dp">
|
android:layout_height="500dp">
|
||||||
|
|
||||||
|
@ -26,15 +26,6 @@
|
||||||
|
|
||||||
</androidx.viewpager2.widget.ViewPager2>
|
</androidx.viewpager2.widget.ViewPager2>
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/home_preview_image"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:src="@drawable/example_poster" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/home_padding"
|
android:id="@+id/home_padding"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -44,16 +35,16 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.SearchView
|
<androidx.appcompat.widget.SearchView
|
||||||
android:id="@+id/home_search"
|
android:id="@+id/home_search"
|
||||||
android:nextFocusRight="@id/home_switch_account"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:padding="0dp"
|
|
||||||
android:layout_marginEnd="50dp"
|
android:layout_marginEnd="50dp"
|
||||||
android:editTextColor="@color/white"
|
android:editTextColor="@color/white"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
|
||||||
android:iconifiedByDefault="true"
|
android:iconifiedByDefault="true"
|
||||||
|
android:nextFocusRight="@id/home_preview_switch_account"
|
||||||
|
|
||||||
|
android:padding="0dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textColorHint="@color/white"
|
android:textColorHint="@color/white"
|
||||||
app:closeIcon="@drawable/ic_baseline_close_24"
|
app:closeIcon="@drawable/ic_baseline_close_24"
|
||||||
|
@ -64,15 +55,15 @@
|
||||||
tools:ignore="RtlSymmetry" />
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:id="@+id/home_preview_switch_account"
|
||||||
|
|
||||||
android:nextFocusLeft="@id/home_search"
|
|
||||||
android:id="@+id/home_switch_account"
|
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginStart="-50dp"
|
android:layout_marginStart="-50dp"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/account"
|
android:contentDescription="@string/account"
|
||||||
|
android:nextFocusLeft="@id/home_search"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_outline_account_circle_24" />
|
android:src="@drawable/ic_outline_account_circle_24" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -150,6 +141,7 @@
|
||||||
app:tint="?attr/white" />
|
app:tint="?attr/white" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
android:layout_height="0dp" />
|
android:layout_height="0dp" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/home_preview"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
@ -28,7 +27,44 @@
|
||||||
|
|
||||||
</androidx.viewpager2.widget.ViewPager2>
|
</androidx.viewpager2.widget.ViewPager2>
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/player_button_tv_attr"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/home_preview_change_api"
|
||||||
|
style="@style/RegularButtonTV"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="@drawable/player_button_tv_attr_no_bg"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
android:nextFocusRight="@id/home_preview_switch_account"
|
||||||
|
android:nextFocusDown="@id/home_preview_play_btt" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/home_preview_switch_account"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:background="@drawable/player_button_tv_attr_no_bg"
|
||||||
|
android:contentDescription="@string/account"
|
||||||
|
android:nextFocusLeft="@id/home_preview_change_api"
|
||||||
|
android:nextFocusDown="@id/home_preview_info_btt"
|
||||||
|
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_outline_account_circle_24"
|
||||||
|
android:tag="@string/tv_no_focus_tag"
|
||||||
|
app:tint="@color/player_on_button_tv_attr" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="10dp">
|
android:layout_margin="10dp">
|
||||||
|
@ -36,7 +72,7 @@
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/home_preview_change_api"
|
android:id="@+id/home_preview_change_api"
|
||||||
style="@style/RegularButtonTV"
|
style="@style/RegularButtonTV"
|
||||||
android:nextFocusRight="@id/home_switch_account"
|
android:nextFocusRight="@id/home_preview_switch_account"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="top|start"
|
android:layout_gravity="top|start"
|
||||||
android:layout_marginStart="@dimen/navbar_width"
|
android:layout_marginStart="@dimen/navbar_width"
|
||||||
|
@ -48,7 +84,7 @@
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:nextFocusDown="@id/home_preview_play_btt"
|
android:nextFocusDown="@id/home_preview_play_btt"
|
||||||
android:nextFocusLeft="@id/home_preview_change_api"
|
android:nextFocusLeft="@id/home_preview_change_api"
|
||||||
android:id="@+id/home_switch_account"
|
android:id="@+id/home_preview_switch_account"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -56,9 +92,9 @@
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_outline_account_circle_24" />
|
android:src="@drawable/ic_outline_account_circle_24" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>-->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/home_preview_viewpager_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
|
@ -138,9 +174,12 @@
|
||||||
android:focusable="false" />
|
android:focusable="false" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
|
<!-- <FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="10dp">
|
android:layout_margin="10dp">
|
||||||
|
@ -151,12 +190,12 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="top|start"
|
android:layout_gravity="top|start"
|
||||||
android:layout_marginStart="@dimen/navbar_width"
|
android:layout_marginStart="@dimen/navbar_width"
|
||||||
android:backgroundTint="@color/semiWhite"
|
android:backgroundTint="@color/white_attr_20"
|
||||||
android:minWidth="150dp"
|
android:minWidth="150dp"
|
||||||
android:nextFocusUp="@id/home_preview_play_btt"
|
android:nextFocusUp="@id/home_preview_play_btt"
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusDown="@id/home_watch_child_recyclerview" />
|
android:nextFocusDown="@id/home_watch_child_recyclerview" />
|
||||||
</FrameLayout>
|
</FrameLayout>-->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/home_watch_holder"
|
android:id="@+id/home_watch_holder"
|
||||||
|
@ -179,12 +218,12 @@
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/home_watch_child_recyclerview"
|
android:id="@+id/home_watch_child_recyclerview"
|
||||||
android:nextFocusUp="@id/home_preview_change_api2"
|
|
||||||
android:nextFocusDown="@id/home_type_holder"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
android:nextFocusUp="@id/home_preview_play_btt"
|
||||||
|
android:nextFocusDown="@id/home_type_holder"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="@dimen/navbar_width"
|
android:paddingStart="@dimen/navbar_width"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
|
@ -216,14 +255,14 @@
|
||||||
|
|
||||||
<com.google.android.material.chip.ChipGroup
|
<com.google.android.material.chip.ChipGroup
|
||||||
android:id="@+id/home_type_holder"
|
android:id="@+id/home_type_holder"
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:descendantFocusability="afterDescendants"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/navbar_width"
|
android:layout_marginStart="@dimen/navbar_width"
|
||||||
|
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
@ -231,11 +270,11 @@
|
||||||
style="@style/ChipFilled"
|
style="@style/ChipFilled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusRight="@id/home_plan_to_watch_btt"
|
android:nextFocusRight="@id/home_plan_to_watch_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:text="@string/type_watching" />
|
android:text="@string/type_watching" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
@ -243,11 +282,11 @@
|
||||||
style="@style/ChipFilled"
|
style="@style/ChipFilled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:nextFocusLeft="@id/home_type_watching_btt"
|
android:nextFocusLeft="@id/home_type_watching_btt"
|
||||||
android:nextFocusRight="@id/home_type_on_hold_btt"
|
android:nextFocusRight="@id/home_type_on_hold_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:text="@string/type_plan_to_watch" />
|
android:text="@string/type_plan_to_watch" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
@ -255,11 +294,11 @@
|
||||||
style="@style/ChipFilled"
|
style="@style/ChipFilled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:nextFocusLeft="@id/home_plan_to_watch_btt"
|
android:nextFocusLeft="@id/home_plan_to_watch_btt"
|
||||||
android:nextFocusRight="@id/home_type_dropped_btt"
|
android:nextFocusRight="@id/home_type_dropped_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:text="@string/type_on_hold" />
|
android:text="@string/type_on_hold" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
@ -267,37 +306,37 @@
|
||||||
style="@style/ChipFilled"
|
style="@style/ChipFilled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:nextFocusLeft="@id/home_type_on_hold_btt"
|
android:nextFocusLeft="@id/home_type_on_hold_btt"
|
||||||
android:nextFocusRight="@id/home_type_completed_btt"
|
android:nextFocusRight="@id/home_type_completed_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:text="@string/type_dropped" />
|
android:text="@string/type_dropped" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
android:id="@+id/home_type_completed_btt"
|
android:id="@+id/home_type_completed_btt"
|
||||||
style="@style/ChipFilled"
|
style="@style/ChipFilled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
|
||||||
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
|
||||||
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nextFocusLeft="@id/home_type_dropped_btt"
|
android:nextFocusLeft="@id/home_type_dropped_btt"
|
||||||
|
|
||||||
|
android:nextFocusUp="@id/home_watch_child_recyclerview"
|
||||||
|
android:nextFocusDown="@id/home_bookmarked_child_recyclerview"
|
||||||
android:text="@string/type_completed" />
|
android:text="@string/type_completed" />
|
||||||
</com.google.android.material.chip.ChipGroup>
|
</com.google.android.material.chip.ChipGroup>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/home_bookmarked_child_recyclerview"
|
android:id="@+id/home_bookmarked_child_recyclerview"
|
||||||
android:nextFocusUp="@id/home_type_holder"
|
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
|
||||||
android:nextFocusDown="@id/home_child_recyclerview"
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
android:nextFocusUp="@id/home_type_holder"
|
||||||
|
|
||||||
|
android:nextFocusDown="@id/home_child_recyclerview"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="@dimen/navbar_width"
|
android:paddingStart="@dimen/navbar_width"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
|
|
|
@ -8,13 +8,14 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.home.HomeFragment">
|
tools:context=".ui.home.HomeFragment">
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/home_loading"
|
android:id="@+id/home_loading"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/navbar_width"
|
android:layout_marginStart="@dimen/navbar_width"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="gone">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
|
@ -93,22 +94,41 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.facebook.shimmer.ShimmerFrameLayout>
|
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/home_loading_statusbar"
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="70dp">
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/player_button_tv_attr"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/home_change_api"
|
||||||
|
style="@style/RegularButtonTV"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="@drawable/player_button_tv_attr_no_bg"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
|
android:nextFocusRight="@id/home_switch_account" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/home_change_api_loading"
|
android:id="@+id/home_switch_account"
|
||||||
android:layout_width="30dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="30dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_vertical|end"
|
android:layout_gravity="end"
|
||||||
|
android:background="@drawable/player_button_tv_attr_no_bg"
|
||||||
|
android:contentDescription="@string/account"
|
||||||
|
android:nextFocusLeft="@id/home_change_api"
|
||||||
|
|
||||||
android:layout_margin="10dp"
|
android:padding="10dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:src="@drawable/ic_outline_account_circle_24"
|
||||||
android:contentDescription="@string/home_change_provider_img_des"
|
android:tag="@string/tv_no_focus_tag"
|
||||||
android:src="@drawable/ic_baseline_keyboard_arrow_down_24" />
|
app:tint="@color/player_on_button_tv_attr" />
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -155,7 +175,6 @@
|
||||||
android:textColor="?attr/textColor" />
|
android:textColor="?attr/textColor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/home_master_recycler"
|
android:id="@+id/home_master_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -164,7 +183,8 @@
|
||||||
android:nextFocusLeft="@id/nav_rail_view"
|
android:nextFocusLeft="@id/nav_rail_view"
|
||||||
android:nextFocusUp="@id/home_bookmarked_child_recyclerview"
|
android:nextFocusUp="@id/home_bookmarked_child_recyclerview"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/homepage_parent_tv" />
|
tools:listitem="@layout/homepage_parent_tv"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/home_api_fab"
|
android:id="@+id/home_api_fab"
|
||||||
|
|
|
@ -65,5 +65,6 @@
|
||||||
<attr name="grayTextColor" format="color" />
|
<attr name="grayTextColor" format="color" />
|
||||||
<attr name="iconColor" format="color" />
|
<attr name="iconColor" format="color" />
|
||||||
<attr name="white" format="color" />
|
<attr name="white" format="color" />
|
||||||
|
<attr name="black" format="color" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
|
@ -13,7 +13,6 @@
|
||||||
<color name="boxItemBackground">#161616</color> <!-- 17171B 1B1B20-->
|
<color name="boxItemBackground">#161616</color> <!-- 17171B 1B1B20-->
|
||||||
|
|
||||||
<color name="textColor">#e9eaee</color> <!--FFF-->
|
<color name="textColor">#e9eaee</color> <!--FFF-->
|
||||||
<color name="semiWhite">#1AFFFFFF</color> <!--FFF-->
|
|
||||||
<color name="grayTextColor">#9ba0a4</color> <!-- 5e5f62-->
|
<color name="grayTextColor">#9ba0a4</color> <!-- 5e5f62-->
|
||||||
<color name="grayShimmer">#DCDCDC</color> <!-- 5e5f62-->
|
<color name="grayShimmer">#DCDCDC</color> <!-- 5e5f62-->
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<string name="auto_update_key" translatable="false">auto_update</string>
|
<string name="auto_update_key" translatable="false">auto_update</string>
|
||||||
<string name="auto_update_plugins_key" translatable="false">auto_update_plugins</string>
|
<string name="auto_update_plugins_key" translatable="false">auto_update_plugins</string>
|
||||||
<string name="auto_download_plugins_key" translatable="false">auto_download_plugins_key</string>
|
<string name="auto_download_plugins_key" translatable="false">auto_download_plugins_key</string>
|
||||||
<string name="auto_download_plugins_pref" translatable="false">auto_download_plugins_pref</string>
|
|
||||||
<string name="skip_update_key" translatable="false">skip_update_key</string>
|
<string name="skip_update_key" translatable="false">skip_update_key</string>
|
||||||
<string name="prerelease_update_key" translatable="false">prerelease_update</string>
|
<string name="prerelease_update_key" translatable="false">prerelease_update</string>
|
||||||
<string name="manual_check_update_key" translatable="false">manual_check_update</string>
|
<string name="manual_check_update_key" translatable="false">manual_check_update</string>
|
||||||
|
|
|
@ -62,7 +62,8 @@
|
||||||
<item name="iconGrayBackground">@color/iconGrayBackground</item>
|
<item name="iconGrayBackground">@color/iconGrayBackground</item>
|
||||||
<item name="boxItemBackground">@color/boxItemBackground</item>
|
<item name="boxItemBackground">@color/boxItemBackground</item>
|
||||||
<item name="iconColor">@color/iconColor</item>
|
<item name="iconColor">@color/iconColor</item>
|
||||||
<item name="white">#FFF</item>
|
<item name="white">@color/white</item>
|
||||||
|
<item name="black">@color/black</item>
|
||||||
|
|
||||||
<item name="preferenceTheme">@style/CustomPreferenceThemeOverlay</item>
|
<item name="preferenceTheme">@style/CustomPreferenceThemeOverlay</item>
|
||||||
|
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
|
|
||||||
<style name="ChipFilledSemiTransparent" parent="@style/ChipFilled">
|
<style name="ChipFilledSemiTransparent" parent="@style/ChipFilled">
|
||||||
<item name="chipBackgroundColor">@color/transparent</item>
|
<item name="chipBackgroundColor">@color/transparent</item>
|
||||||
<item name="chipSurfaceColor">@color/semiWhite</item>
|
<item name="chipSurfaceColor">@color/white_attr_20</item>
|
||||||
<item name="backgroundColor">@color/transparent</item>
|
<item name="backgroundColor">@color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -117,6 +118,7 @@
|
||||||
<item name="textColor">@color/textColor</item>
|
<item name="textColor">@color/textColor</item>
|
||||||
<item name="grayTextColor">@color/grayTextColor</item>
|
<item name="grayTextColor">@color/grayTextColor</item>
|
||||||
<item name="white">@color/white</item>
|
<item name="white">@color/white</item>
|
||||||
|
<item name="black">@color/black</item>
|
||||||
<item name="colorOnPrimary">@color/whiteText</item>
|
<item name="colorOnPrimary">@color/whiteText</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -158,7 +160,9 @@
|
||||||
<item name="boxItemBackground">@color/lightItemBackground</item>
|
<item name="boxItemBackground">@color/lightItemBackground</item>
|
||||||
<item name="textColor">@color/lightTextColor</item>
|
<item name="textColor">@color/lightTextColor</item>
|
||||||
<item name="grayTextColor">@color/lightGrayTextColor</item>
|
<item name="grayTextColor">@color/lightGrayTextColor</item>
|
||||||
<item name="white">#000</item>
|
<item name="white">@color/black</item>
|
||||||
|
<item name="black">@color/white</item>
|
||||||
|
|
||||||
<item name="colorOnPrimary">@color/blackText</item>
|
<item name="colorOnPrimary">@color/blackText</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -170,6 +174,7 @@
|
||||||
<item name="textColor">@color/material_dynamic_neutral90</item>
|
<item name="textColor">@color/material_dynamic_neutral90</item>
|
||||||
<item name="grayTextColor">@color/material_dynamic_neutral60</item>
|
<item name="grayTextColor">@color/material_dynamic_neutral60</item>
|
||||||
<item name="white">@color/material_dynamic_neutral90</item>
|
<item name="white">@color/material_dynamic_neutral90</item>
|
||||||
|
<item name="black">@color/material_dynamic_neutral10</item>
|
||||||
<item name="colorOnPrimary">@color/material_on_primary_emphasis_medium</item>
|
<item name="colorOnPrimary">@color/material_on_primary_emphasis_medium</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -747,13 +752,13 @@
|
||||||
<item name="android:stateListAnimator">@null</item>
|
<item name="android:stateListAnimator">@null</item>
|
||||||
<item name="strokeColor">@color/transparent</item>
|
<item name="strokeColor">@color/transparent</item>
|
||||||
<item name="backgroundTint">@null</item>
|
<item name="backgroundTint">@null</item>
|
||||||
<item name="android:background">@drawable/player_button_tv</item>
|
<item name="android:background">@drawable/player_button_tv_attr</item>
|
||||||
<item name="rippleColor">@color/white</item>
|
<item name="rippleColor">@color/white</item>
|
||||||
<item name="android:shadowColor">@color/transparent</item>
|
<item name="android:shadowColor">@color/transparent</item>
|
||||||
|
|
||||||
<item name="iconTint">@color/player_on_button_tv</item>
|
<item name="iconTint">@color/player_on_button_tv_attr</item>
|
||||||
<item name="textColor">@color/player_on_button_tv</item>
|
<item name="textColor">@color/player_on_button_tv_attr</item>
|
||||||
<item name="android:textColor">@color/player_on_button_tv</item>
|
<item name="android:textColor">@color/player_on_button_tv_attr</item>
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:layout_height">40dp</item>
|
<item name="android:layout_height">40dp</item>
|
||||||
<item name="iconSize">16dp</item>
|
<item name="iconSize">16dp</item>
|
||||||
|
|
Loading…
Reference in a new issue