refactor: convert from Android TV to phone/tablet mode

- Replace Theme.Leanback with Theme.AppCompat.DayNight.NoActionBar
- Remove leanback dependencies (leanback, leanback-preference)
- Remove LEANBACK_LAUNCHER, leanback feature, banner from manifest
- PlayerActivity: replace D-pad with touch controls (click to toggle episodes, close button)
- SearchFragment: adaptive grid (3 cols phone / 5 cols tablet), remove focus-based history toggle
- Fix deprecated adapterPosition -> bindingAdapterPosition
This commit is contained in:
xiaji
2026-05-24 21:19:34 +08:00
parent 7dee3977de
commit 153b555d52
7 changed files with 34 additions and 54 deletions

View File

@@ -77,7 +77,8 @@ class SearchFragment : Fragment() {
}
private fun setupResultsGrid() {
resultsGrid.layoutManager = GridLayoutManager(context, 4)
val spanCount = if (resources.configuration.screenWidthDp >= 600) 5 else 3
resultsGrid.layoutManager = GridLayoutManager(context, spanCount)
resultsGrid.adapter = adapter
}
@@ -107,12 +108,6 @@ class SearchFragment : Fragment() {
showHistory(emptyList())
}
}
searchInput.setOnFocusChangeListener { _, hasFocus ->
if (hasFocus) {
historyContainer.visibility = View.VISIBLE
}
}
}
private fun performSearch(keyword: String) {