From 210de873988fbca2e7b04263dc3dd5b0f72d382a Mon Sep 17 00:00:00 2001 From: Uwe Trottmann Date: Fri, 13 Sep 2024 11:30:39 +0200 Subject: [PATCH] ShowFragment: add full show title, copy on long press --- CHANGELOG.md | 2 + .../shows/overview/ShowFragment.kt | 6 ++- .../main/res/layout/fragment_show_narrow.xml | 37 ++++++++++++++----- .../main/res/layout/fragment_show_regular.xml | 17 ++++++++- 4 files changed, 51 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4335ba2374..96a250a99d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ Version 2024.4 -------------- *in development* +* 🔧 Show details: display full show title, touch and hold to copy it to clipboard (like for episode + and movie titles). * 🔨 Android 15: turn off predictive back animation due to unresolved issues. * 📝 Latest user interface translations from Crowdin. diff --git a/app/src/main/java/com/battlelancer/seriesguide/shows/overview/ShowFragment.kt b/app/src/main/java/com/battlelancer/seriesguide/shows/overview/ShowFragment.kt index 82d4bc5eba..b9fa5879c3 100644 --- a/app/src/main/java/com/battlelancer/seriesguide/shows/overview/ShowFragment.kt +++ b/app/src/main/java/com/battlelancer/seriesguide/shows/overview/ShowFragment.kt @@ -25,8 +25,8 @@ import com.battlelancer.seriesguide.SgApp import com.battlelancer.seriesguide.comments.TraktCommentsActivity import com.battlelancer.seriesguide.databinding.LayoutRatingsBinding import com.battlelancer.seriesguide.notifications.NotificationService -import com.battlelancer.seriesguide.people.PeopleListHelper import com.battlelancer.seriesguide.people.Credits +import com.battlelancer.seriesguide.people.PeopleListHelper import com.battlelancer.seriesguide.settings.NotificationSettings import com.battlelancer.seriesguide.shows.database.SgShow2 import com.battlelancer.seriesguide.shows.overview.OverviewActivityImpl.OverviewLayoutType.MULTI_PANE_VERTICAL @@ -87,6 +87,7 @@ class ShowFragment() : Fragment() { val scrollViewShow: NestedScrollView val containerPoster: View val imageViewPoster: ImageView + val textViewTitle: TextView val textViewStatus: TextView val textViewBaseInfo: TextView val textViewOverview: TextView @@ -122,6 +123,7 @@ class ShowFragment() : Fragment() { scrollViewShow = view.findViewById(R.id.scrollViewShow) containerPoster = view.findViewById(R.id.containerShowPoster) imageViewPoster = view.findViewById(R.id.imageViewShowPoster) + textViewTitle = view.findViewById(R.id.textViewShowTitle) textViewStatus = view.findViewById(R.id.textViewShowStatus) textViewBaseInfo = view.findViewById(R.id.textViewShowBaseInfo) textViewOverview = view.findViewById(R.id.textViewShowOverview) @@ -200,6 +202,7 @@ class ShowFragment() : Fragment() { setCrewVisibility(binding, false) // set up long-press to copy text to clipboard (d-pad friendly vs text selection) + binding.textViewTitle.copyTextToClipboardOnLongClick() binding.textViewOverview.copyTextToClipboardOnLongClick() binding.textViewGenres.copyTextToClipboardOnLongClick() binding.textViewContentRating.copyTextToClipboardOnLongClick() @@ -275,6 +278,7 @@ class ShowFragment() : Fragment() { // Release time, base info and status binding.buttonEditReleaseTime.text = showForUi.releaseTime + binding.textViewTitle.text = showForUi.show.title binding.textViewBaseInfo.text = showForUi.baseInfo binding.textViewStatus.text = ShowStatus.buildYearAndStatus(requireContext(), show) diff --git a/app/src/main/res/layout/fragment_show_narrow.xml b/app/src/main/res/layout/fragment_show_narrow.xml index 43f8b5381d..3dafc93523 100644 --- a/app/src/main/res/layout/fragment_show_narrow.xml +++ b/app/src/main/res/layout/fragment_show_narrow.xml @@ -67,16 +67,33 @@ + + +