mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
resize toast
This commit is contained in:
parent
5ae56a07ad
commit
4ee7623fbe
2 changed files with 12 additions and 5 deletions
|
@ -810,9 +810,9 @@ class PlayerFragment : Fragment() {
|
|||
}
|
||||
|
||||
private val resizeModes = listOf(
|
||||
AspectRatioFrameLayout.RESIZE_MODE_FIT,
|
||||
AspectRatioFrameLayout.RESIZE_MODE_FILL,
|
||||
AspectRatioFrameLayout.RESIZE_MODE_ZOOM,
|
||||
Pair(AspectRatioFrameLayout.RESIZE_MODE_FIT, R.string.resize_fit),
|
||||
Pair(AspectRatioFrameLayout.RESIZE_MODE_FILL, R.string.resize_fill),
|
||||
Pair(AspectRatioFrameLayout.RESIZE_MODE_ZOOM, R.string.resize_zoom),
|
||||
)
|
||||
|
||||
private var localData: LoadResponse? = null
|
||||
|
@ -1470,14 +1470,17 @@ class PlayerFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
player_view.resizeMode = resizeModes[resizeMode]
|
||||
player_view.resizeMode = resizeModes[resizeMode].first
|
||||
if (playerResizeEnabled) {
|
||||
resize_player.visibility = VISIBLE
|
||||
resize_player.setOnClickListener {
|
||||
resizeMode = (resizeMode + 1) % resizeModes.size
|
||||
|
||||
requireContext().setKey(RESIZE_MODE_KEY, resizeMode)
|
||||
player_view.resizeMode = resizeModes[resizeMode]
|
||||
player_view.resizeMode = resizeModes[resizeMode].first
|
||||
activity?.let { act ->
|
||||
showToast(act, resizeModes[resizeMode].second, Toast.LENGTH_SHORT);
|
||||
}
|
||||
//exoPlayer.videoScalingMode = C.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -257,6 +257,10 @@
|
|||
<string name="watch_quality_pref">Preferred watch quality</string>
|
||||
<string name="display_subbed_dubbed_settings">Display Dubbed/Subbed Anime</string>
|
||||
|
||||
<string name="resize_fit">Fit to screen</string>
|
||||
<string name="resize_fill">Stretch</string>
|
||||
<string name="resize_zoom">Zoom</string>
|
||||
|
||||
<string name="legal_notice" translatable="false">Disclaimer</string>
|
||||
<string name="legal_notice_key" translatable="false">legal_notice_key</string>
|
||||
<string name="legal_notice_text" translatable="false">Any legal issues regarding the content on this application should be taken up with the actual file hosts and providers themselves as we are not affiliated with them.
|
||||
|
|
Loading…
Reference in a new issue