From c18856c8c336cda03805a442aea77cfd82bc13b9 Mon Sep 17 00:00:00 2001 From: reduplicated <110570621+reduplicated@users.noreply.github.com> Date: Fri, 28 Oct 2022 18:43:14 +0200 Subject: [PATCH] minor UI and icon changes + tmp readded search --- .../cloudstream3/ui/home/HomeFragment.kt | 43 ++- .../cloudstream3/ui/home/HomeViewModel.kt | 8 +- .../cloudstream3/ui/result/ResultFragment.kt | 34 ++- .../ui/result/ResultFragmentPhone.kt | 18 +- app/src/main/res/drawable/home_alt.xml | 9 + .../main/res/drawable/ic_baseline_add_24.xml | 13 +- .../drawable/ic_baseline_arrow_back_24.xml | 13 +- .../drawable/ic_baseline_arrow_forward_24.xml | 13 +- .../res/drawable/ic_baseline_bookmark_24.xml | 11 +- .../ic_baseline_delete_outline_24.xml | 16 +- .../drawable/ic_baseline_filter_list_24.xml | 13 +- .../ic_baseline_keyboard_arrow_down_24.xml | 13 +- .../main/res/drawable/ic_baseline_tune_24.xml | 11 +- app/src/main/res/drawable/search_icon.xml | 30 +-- app/src/main/res/drawable/settings_alt.xml | 9 + .../main/res/drawable/storage_bar_left.xml | 7 + .../res/drawable/storage_bar_left_box.xml | 5 + app/src/main/res/drawable/storage_bar_mid.xml | 4 + .../main/res/drawable/storage_bar_mid_box.xml | 5 + .../main/res/drawable/storage_bar_right.xml | 7 + .../res/drawable/storage_bar_right_box.xml | 5 + .../main/res/layout/fragment_downloads.xml | 252 +++++++++--------- .../main/res/layout/fragment_extensions.xml | 113 ++++---- app/src/main/res/layout/fragment_home.xml | 90 +++++-- app/src/main/res/layout/fragment_home_tv.xml | 80 +++--- app/src/main/res/layout/fragment_result.xml | 9 +- app/src/main/res/menu/bottom_nav_menu.xml | 4 +- app/src/main/res/values/dimens.xml | 3 + app/src/main/res/values/styles.xml | 3 +- 29 files changed, 508 insertions(+), 333 deletions(-) create mode 100644 app/src/main/res/drawable/home_alt.xml create mode 100644 app/src/main/res/drawable/settings_alt.xml create mode 100644 app/src/main/res/drawable/storage_bar_left.xml create mode 100644 app/src/main/res/drawable/storage_bar_left_box.xml create mode 100644 app/src/main/res/drawable/storage_bar_mid.xml create mode 100644 app/src/main/res/drawable/storage_bar_mid_box.xml create mode 100644 app/src/main/res/drawable/storage_bar_right.xml create mode 100644 app/src/main/res/drawable/storage_bar_right_box.xml diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt index 2f539a33..7026eb12 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt @@ -6,6 +6,7 @@ import android.content.Context import android.content.DialogInterface import android.content.Intent import android.content.res.Configuration +import android.graphics.Color import android.net.Uri import android.os.Bundle import android.view.LayoutInflater @@ -14,7 +15,6 @@ import android.view.ViewGroup import android.widget.* import androidx.appcompat.app.AlertDialog import androidx.appcompat.widget.SearchView -import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat.getDrawable import androidx.core.view.isGone import androidx.core.view.isVisible @@ -23,7 +23,6 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.preference.PreferenceManager import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.LinearSnapHelper import androidx.recyclerview.widget.RecyclerView import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetDialog @@ -104,11 +103,13 @@ import kotlinx.android.synthetic.main.fragment_home.home_watch_holder import kotlinx.android.synthetic.main.fragment_home.home_watch_parent_item_title import kotlinx.android.synthetic.main.fragment_home.result_error_text import kotlinx.android.synthetic.main.fragment_home_tv.* +import kotlinx.android.synthetic.main.fragment_search.* import kotlinx.android.synthetic.main.home_episodes_expanded.* import kotlinx.android.synthetic.main.tvtypes_chips.* import kotlinx.android.synthetic.main.tvtypes_chips.view.* import java.util.* + const val HOME_BOOKMARK_VALUE_LIST = "home_bookmarked_last_list" const val HOME_PREF_HOMEPAGE = "home_pref_homepage" @@ -560,7 +561,12 @@ class HomeFragment : Fragment() { // very ugly code, but I dont care val watchType = DataStoreHelper.getResultWatchState(preview.value.getId()) home_preview_bookmark?.setText(watchType.stringRes) - home_preview_bookmark?.setCompoundDrawablesWithIntrinsicBounds(null,getDrawable(home_preview_bookmark.context, watchType.iconRes),null,null) + home_preview_bookmark?.setCompoundDrawablesWithIntrinsicBounds( + null, + getDrawable(home_preview_bookmark.context, watchType.iconRes), + null, + null + ) home_preview_bookmark?.setOnClickListener { fab -> activity?.showBottomDialog( WatchType.values().map { fab.context.getString(it.stringRes) } @@ -570,7 +576,12 @@ class HomeFragment : Fragment() { showApply = false, {}) { val newValue = WatchType.values()[it] - home_preview_bookmark?.setCompoundDrawablesWithIntrinsicBounds(null,getDrawable(home_preview_bookmark.context, newValue.iconRes),null,null) + home_preview_bookmark?.setCompoundDrawablesWithIntrinsicBounds( + null, + getDrawable(home_preview_bookmark.context, newValue.iconRes), + null, + null + ) home_preview_bookmark?.setText(newValue.stringRes) updateWatchStatus(preview.value, newValue) @@ -585,6 +596,11 @@ class HomeFragment : Fragment() { } } + val searchText = + home_search?.findViewById(androidx.appcompat.R.id.search_src_text) + searchText?.setTextColor(Color.WHITE) + searchText?.setHintTextColor(Color.WHITE) + observe(homeViewModel.apiName) { apiName -> currentApiName = apiName // setKey(USER_SELECTED_HOMEPAGE_API, apiName) @@ -749,14 +765,22 @@ class HomeFragment : Fragment() { Pair(home_type_on_hold_btt, WatchType.ONHOLD), Pair(home_plan_to_watch_btt, WatchType.PLANTOWATCH), ) + val currentSet = getKey(HOME_BOOKMARK_VALUE_LIST) + ?.map { WatchType.fromInternalId(it) }?.toSet() ?: emptySet() + + for ((chip, watch) in toggleList) { + chip.isChecked = currentSet.contains(watch) + chip?.setOnCheckedChangeListener { _, _ -> + homeViewModel.loadStoredData(toggleList.filter { it.first?.isChecked == true } + .map { it.second }.toSet()) + } + /*chip?.setOnClickListener { + - for (item in toggleList) { - val watch = item.second - item.first?.setOnClickListener { homeViewModel.loadStoredData(EnumSet.of(watch)) } - item.first?.setOnLongClickListener { itemView -> + chip?.setOnLongClickListener { itemView -> val list = EnumSet.noneOf(WatchType::class.java) itemView.context.getKey(HOME_BOOKMARK_VALUE_LIST) ?.map { WatchType.fromInternalId(it) }?.let { @@ -770,7 +794,7 @@ class HomeFragment : Fragment() { } homeViewModel.loadStoredData(list) return@setOnLongClickListener true - } + }*/ } observe(homeViewModel.availableWatchStatusTypes) { availableWatchStatusTypes -> @@ -993,6 +1017,7 @@ class HomeFragment : Fragment() { } //context?.fixPaddingStatusbarView(home_statusbar) + context?.fixPaddingStatusbar(home_padding) context?.fixPaddingStatusbar(home_loading_statusbar) home_master_recycler.adapter = diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt index 0b928a55..af24973d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt @@ -51,8 +51,8 @@ class HomeViewModel : ViewModel() { } private val _availableWatchStatusTypes = - MutableLiveData, EnumSet>>() - val availableWatchStatusTypes: LiveData, EnumSet>> = + MutableLiveData, Set>>() + val availableWatchStatusTypes: LiveData, Set>> = _availableWatchStatusTypes private val _bookmarks = MutableLiveData>>() val bookmarks: LiveData>> = _bookmarks @@ -98,7 +98,7 @@ class HomeViewModel : ViewModel() { } } - fun loadStoredData(preferredWatchStatus: EnumSet?) = viewModelScope.launchSafe { + fun loadStoredData(preferredWatchStatus: Set?) = viewModelScope.launchSafe { val watchStatusIds = withContext(Dispatchers.IO) { getAllWatchStateIds()?.map { id -> Pair(id, getResultWatchState(id)) @@ -106,7 +106,7 @@ class HomeViewModel : ViewModel() { }?.distinctBy { it.first } ?: return@launchSafe val length = WatchType.values().size - val currentWatchTypes = EnumSet.noneOf(WatchType::class.java) + val currentWatchTypes = mutableSetOf() for (watch in watchStatusIds) { currentWatchTypes.add(watch.second) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt index a173f1c1..3aae7fd2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt @@ -22,7 +22,7 @@ import androidx.core.widget.doOnTextChanged import androidx.lifecycle.ViewModelProvider import androidx.preference.PreferenceManager import com.discord.panels.OverlappingPanelsLayout -import com.google.android.material.button.MaterialButton +import com.google.android.material.chip.Chip import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings import com.lagradost.cloudstream3.APIHolder.getApiFromNameNull import com.lagradost.cloudstream3.APIHolder.updateHasTrailers @@ -99,6 +99,7 @@ import kotlinx.android.synthetic.main.result_sync.* import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking +import com.google.android.material.chip.ChipDrawable const val START_ACTION_RESUME_LATEST = 1 const val START_ACTION_LOAD_EP = 2 @@ -926,18 +927,37 @@ open class ResultFragment : ResultTrailerPlayer() { val tags = d.tags result_tag_holder?.isVisible = tags.isNotEmpty() - if (tags.isNotEmpty()) { - //result_tag_holder?.visibility = VISIBLE - val isOnTv = isTrueTvSettings() - for ((index, tag) in tags.withIndex()) { + result_tag?.apply { + tags.forEach { tag -> + val chip = Chip(context) + val chipDrawable = ChipDrawable.createFromAttributes( + context, + null, + 0, + R.style.ChipFilled + ) + chip.setChipDrawable(chipDrawable) + chip.text = tag + chip.isCheckable = false + chip.isFocusable = false + chip.isClickable = false + addView(chip) + } + } + // if (tags.isNotEmpty()) { + //result_tag_holder?.visibility = VISIBLE + //val isOnTv = isTrueTvSettings() + + + /*for ((index, tag) in tags.withIndex()) { val viewBtt = layoutInflater.inflate(R.layout.result_tag, null) val btt = viewBtt.findViewById(R.id.result_tag_card) btt.text = tag btt.isFocusable = !isOnTv btt.isClickable = !isOnTv result_tag?.addView(viewBtt, index) - } - } + }*/ + //} } is Resource.Failure -> { result_error_text.text = storedData?.url?.plus("\n") + data.errorString diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt index 1cd3641d..813872c9 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt @@ -27,8 +27,10 @@ import com.lagradost.cloudstream3.ui.search.SearchHelper import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable import com.lagradost.cloudstream3.utils.AppUtils.openBrowser import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.SingleSelectionHelper import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialogInstant +import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIcons @@ -127,6 +129,8 @@ class ResultFragmentPhone : ResultFragment() { down.nextFocusUpId = upper.id } + var selectSeason : String? = null + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { val apiName = arguments?.getString(API_NAME_BUNDLE) ?: return @@ -297,6 +301,7 @@ class ResultFragmentPhone : ResultFragment() { observe(viewModel.selectedSeason) { text -> result_season_button.setText(text) + selectSeason = (if (text is Some.Success) text.value else null)?.asStringNull(result_season_button?.context) // If the season button is visible the result season button will be next focus down if (result_season_button?.isVisible == true) if (result_resume_parent?.isVisible == true) @@ -366,17 +371,24 @@ class ResultFragmentPhone : ResultFragment() { observe(viewModel.seasonSelections) { seasonList -> result_season_button?.setOnClickListener { view -> + view?.context?.let { ctx -> val names = seasonList .mapNotNull { (text, r) -> r to (text?.asStringNull(ctx) ?: return@mapNotNull null) } - view.popupMenuNoIconsAndNoStringRes(names.mapIndexed { index, (_, name) -> - index to name - }) { + activity?.showDialog(names.map { it.second },names.indexOfFirst { it.second == selectSeason },"",false,{}) { itemId-> viewModel.changeSeason(names[itemId].first) } + + + + //view.popupMenuNoIconsAndNoStringRes(names.mapIndexed { index, (_, name) -> + // index to name + //}) { + // viewModel.changeSeason(names[itemId].first) + //} } } } diff --git a/app/src/main/res/drawable/home_alt.xml b/app/src/main/res/drawable/home_alt.xml new file mode 100644 index 00000000..ae0e68a4 --- /dev/null +++ b/app/src/main/res/drawable/home_alt.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_add_24.xml b/app/src/main/res/drawable/ic_baseline_add_24.xml index 9fdd2903..b56c474c 100644 --- a/app/src/main/res/drawable/ic_baseline_add_24.xml +++ b/app/src/main/res/drawable/ic_baseline_add_24.xml @@ -1,5 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml b/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml index a6108143..ebe459b2 100644 --- a/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml +++ b/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml @@ -1,5 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_arrow_forward_24.xml b/app/src/main/res/drawable/ic_baseline_arrow_forward_24.xml index 23072282..2ec8c110 100644 --- a/app/src/main/res/drawable/ic_baseline_arrow_forward_24.xml +++ b/app/src/main/res/drawable/ic_baseline_arrow_forward_24.xml @@ -1,5 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_bookmark_24.xml b/app/src/main/res/drawable/ic_baseline_bookmark_24.xml index 8f0b1b18..42cb88d5 100644 --- a/app/src/main/res/drawable/ic_baseline_bookmark_24.xml +++ b/app/src/main/res/drawable/ic_baseline_bookmark_24.xml @@ -1,5 +1,8 @@ - - + + diff --git a/app/src/main/res/drawable/ic_baseline_delete_outline_24.xml b/app/src/main/res/drawable/ic_baseline_delete_outline_24.xml index a93d8ab0..b5cd9ffe 100644 --- a/app/src/main/res/drawable/ic_baseline_delete_outline_24.xml +++ b/app/src/main/res/drawable/ic_baseline_delete_outline_24.xml @@ -1,10 +1,8 @@ - - + + diff --git a/app/src/main/res/drawable/ic_baseline_filter_list_24.xml b/app/src/main/res/drawable/ic_baseline_filter_list_24.xml index 05e18bfa..f016d9b6 100644 --- a/app/src/main/res/drawable/ic_baseline_filter_list_24.xml +++ b/app/src/main/res/drawable/ic_baseline_filter_list_24.xml @@ -1,5 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_keyboard_arrow_down_24.xml b/app/src/main/res/drawable/ic_baseline_keyboard_arrow_down_24.xml index 1aeaa998..0f4bc25f 100644 --- a/app/src/main/res/drawable/ic_baseline_keyboard_arrow_down_24.xml +++ b/app/src/main/res/drawable/ic_baseline_keyboard_arrow_down_24.xml @@ -1,5 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_tune_24.xml b/app/src/main/res/drawable/ic_baseline_tune_24.xml index 2ce603c5..d0c63a3d 100644 --- a/app/src/main/res/drawable/ic_baseline_tune_24.xml +++ b/app/src/main/res/drawable/ic_baseline_tune_24.xml @@ -1,5 +1,8 @@ - - + + diff --git a/app/src/main/res/drawable/search_icon.xml b/app/src/main/res/drawable/search_icon.xml index 18e5e6f8..f6cd5ca5 100644 --- a/app/src/main/res/drawable/search_icon.xml +++ b/app/src/main/res/drawable/search_icon.xml @@ -1,20 +1,10 @@ - - - - + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/settings_alt.xml b/app/src/main/res/drawable/settings_alt.xml new file mode 100644 index 00000000..74983a2e --- /dev/null +++ b/app/src/main/res/drawable/settings_alt.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_left.xml b/app/src/main/res/drawable/storage_bar_left.xml new file mode 100644 index 00000000..493db394 --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_left.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_left_box.xml b/app/src/main/res/drawable/storage_bar_left_box.xml new file mode 100644 index 00000000..4c624a3a --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_left_box.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_mid.xml b/app/src/main/res/drawable/storage_bar_mid.xml new file mode 100644 index 00000000..111a7345 --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_mid.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_mid_box.xml b/app/src/main/res/drawable/storage_bar_mid_box.xml new file mode 100644 index 00000000..090cd54c --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_mid_box.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_right.xml b/app/src/main/res/drawable/storage_bar_right.xml new file mode 100644 index 00000000..42f60344 --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_right.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/storage_bar_right_box.xml b/app/src/main/res/drawable/storage_bar_right_box.xml new file mode 100644 index 00000000..29ecd908 --- /dev/null +++ b/app/src/main/res/drawable/storage_bar_right_box.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_downloads.xml b/app/src/main/res/layout/fragment_downloads.xml index 5e12eb4c..9ee5d716 100644 --- a/app/src/main/res/layout/fragment_downloads.xml +++ b/app/src/main/res/layout/fragment_downloads.xml @@ -1,149 +1,149 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/download_root" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/primaryGrayBackground" + android:orientation="vertical" + tools:context=".ui.download.DownloadFragment"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/primaryGrayBackground" + tools:layout_height="100dp"> + android:id="@+id/download_storage_appbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="10dp" + android:orientation="vertical" + android:visibility="gone" + tools:visibility="visible"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="5dp" + android:text="@string/download_storage_text" + android:textColor="?attr/textColor" /> + android:layout_width="fill_parent" + android:layout_height="12dp" + android:layout_marginBottom="5dp" + android:orientation="horizontal"> + android:id="@+id/download_used" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="0.5" + android:background="@drawable/storage_bar_left" /> + android:id="@+id/download_app" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="0.10" + android:background="@drawable/storage_bar_mid" /> + android:id="@+id/download_free" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="0.10" + android:background="@drawable/storage_bar_right" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_gravity="center_vertical" + android:layout_marginTop="5dp" + android:layout_marginEnd="5dp" + android:layout_marginBottom="5dp" + android:background="@drawable/storage_bar_left_box" /> + android:id="@+id/download_used_txt" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textColor="?attr/textColor" + android:textSize="12sp" + tools:text="Used • 30.58GB" /> + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_gravity="center_vertical" + android:layout_margin="5dp" + android:background="@drawable/storage_bar_mid_box" /> + android:id="@+id/download_app_txt" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textColor="?attr/textColor" + android:textSize="12sp" + tools:text="App • 30.58GB" /> + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_gravity="center_vertical" + android:layout_margin="5dp" + android:background="@drawable/storage_bar_right_box" /> + android:id="@+id/download_free_txt" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textColor="?attr/textColor" + android:textSize="12sp" + tools:text="Free • 30.58GB" /> + android:layout_height="match_parent" + android:background="?attr/primaryBlackBackground" + android:descendantFocusability="afterDescendants" + android:nextFocusLeft="@id/nav_rail_view" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + tools:listitem="@layout/download_header_episode" /> + android:id="@+id/text_no_downloads" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="8dp" + android:textAlignment="center" + android:textSize="20sp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + android:id="@+id/download_loading" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" + android:orientation="vertical" + android:paddingTop="40dp" + app:shimmer_auto_start="true" + app:shimmer_base_alpha="0.2" + app:shimmer_duration="@integer/loading_time" + app:shimmer_highlight_alpha="0.3" + tools:visibility="gone"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/loading_margin" + android:layout_marginEnd="@dimen/loading_margin" + android:orientation="vertical"> @@ -189,10 +189,10 @@ + android:id="@+id/download_stream_button" + style="@style/ExtendedFloatingActionButton" + android:text="@string/stream" + android:textColor="?attr/textColor" + app:icon="@drawable/netflix_play" + tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_extensions.xml b/app/src/main/res/layout/fragment_extensions.xml index c786e2bc..3d0404fc 100644 --- a/app/src/main/res/layout/fragment_extensions.xml +++ b/app/src/main/res/layout/fragment_extensions.xml @@ -11,12 +11,12 @@ - - - - - - + + + + + + + android:visibility="visible"> @@ -83,33 +83,39 @@ android:text="@string/extensions" android:textColor="?attr/textColor" /> - + app:cardCornerRadius="@dimen/storage_radius"> - + android:orientation="horizontal"> - + - - + + + + + + android:background="@drawable/storage_bar_left_box" /> + android:background="@drawable/storage_bar_mid_box" /> + android:background="@drawable/storage_bar_right_box" /> + + android:layout_height="match_parent" + android:orientation="vertical" + android:paddingStart="10dp" + android:paddingEnd="10dp"> - + + - + android:focusable="true" + android:nextFocusLeft="@id/plugin_storage_appbar" + android:src="@drawable/ic_baseline_add_24" + app:tint="?attr/textColor" /> diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 9d430e3d..d127f811 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -294,7 +294,15 @@ android:layout_height="match_parent" android:scaleType="centerCrop" tools:src="@drawable/example_poster" /> - + - + android:layout_height="wrap_content"> - + + + - - - - - - - + - + - + android:nextFocusLeft="@id/nav_rail_view" + android:nextFocusRight="@id/home_plan_to_watch_btt" + android:text="@string/type_watching" /> - + android:nextFocusLeft="@id/home_type_watching_btt" + android:nextFocusRight="@id/home_type_on_hold_btt" + android:text="@string/type_plan_to_watch" /> - + android:nextFocusLeft="@id/home_plan_to_watch_btt" + android:nextFocusRight="@id/home_type_dropped_btt" + android:text="@string/type_on_hold" /> - + android:nextFocusLeft="@id/home_type_on_hold_btt" + android:nextFocusRight="@id/home_type_completed_btt" + android:text="@string/type_dropped" /> - - - + style="@style/ChipFilled" + android:nextFocusLeft="@id/home_type_dropped_btt" + android:text="@string/type_completed" /> + - - + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index fb9180f3..e748868b 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -14,4 +14,7 @@ 15dp 2000 + + 3dp + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9e235bf3..d6e7b65f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -76,7 +76,8 @@