[Android] Enable the stream title click in the more fragment
Nicolas Pomepuy
git at videolan.org
Wed Mar 20 14:20:03 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Mar 20 13:29:31 2024 +0100| [2e766bb2110bbeb90d897732ad348dc143a1cd2e] | committer: Nicolas Pomepuy
Enable the stream title click in the more fragment
Fixes #3054
> https://code.videolan.org/videolan/vlc-android/commit/2e766bb2110bbeb90d897732ad348dc143a1cd2e
---
.../vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
index 890f26bbc1..795cee6fb0 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
@@ -148,12 +148,18 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
if (it) streamsEntry.loading.state = EmptyLoadingState.LOADING
}
}
+ streamsEntry.actionButton.setVisible()
+ streamsEntry.setOnActionClickListener {
+ val i = Intent(requireActivity(), SecondaryActivity::class.java)
+ i.putExtra("fragment", SecondaryActivity.STREAMS)
+ requireActivity().startActivityForResult(i, SecondaryActivity.ACTIVITY_RESULT_SECONDARY)
+ }
settingsButton.setOnClickListener {
- requireActivity().startActivityForResult(Intent(activity, PreferencesActivity::class.java), ACTIVITY_RESULT_PREFERENCES)
+ requireActivity().startActivityForResult(Intent(requireActivity(), PreferencesActivity::class.java), ACTIVITY_RESULT_PREFERENCES)
}
aboutButton.setOnClickListener {
- val i = Intent(activity, SecondaryActivity::class.java)
+ val i = Intent(requireActivity(), SecondaryActivity::class.java)
i.putExtra("fragment", SecondaryActivity.ABOUT)
requireActivity().startActivityForResult(i, SecondaryActivity.ACTIVITY_RESULT_SECONDARY)
}
@@ -174,7 +180,7 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
streamsEntry.list.adapter = streamsAdapter
historyEntry.setOnActionClickListener {
- val i = Intent(activity, SecondaryActivity::class.java)
+ val i = Intent(requireActivity(), SecondaryActivity::class.java)
i.putExtra("fragment", SecondaryActivity.HISTORY)
requireActivity().startActivityForResult(i, SecondaryActivity.ACTIVITY_RESULT_SECONDARY)
}
More information about the Android
mailing list