From 52e7da0b2169b4b44c9c8050186bb20db0063a85 Mon Sep 17 00:00:00 2001 From: Jean-BaptisteC Date: Wed, 10 Jan 2024 18:01:35 +0100 Subject: [PATCH] Remove duplicate link on tracker screen --- .../trackerdetail/TrackerDetailFragment.kt | 26 ++++++++--------- .../res/layout/fragment_tracker_detail.xml | 28 ++++++++----------- app/src/main/res/menu/tracker_detail_menu.xml | 11 -------- 3 files changed, 25 insertions(+), 40 deletions(-) delete mode 100644 app/src/main/res/menu/tracker_detail_menu.xml diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/trackerdetail/TrackerDetailFragment.kt b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/trackerdetail/TrackerDetailFragment.kt index b4b56f4c..cfe776dc 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/trackerdetail/TrackerDetailFragment.kt +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/trackerdetail/TrackerDetailFragment.kt @@ -58,18 +58,19 @@ class TrackerDetailFragment : Fragment(R.layout.fragment_tracker_detail) { } binding.apply { - toolbarTD.apply { - menu.clear() - inflateMenu(R.menu.tracker_detail_menu) - setOnMenuItemClickListener { - if (it.itemId == R.id.openTrackerPage) { - openURL( - customTabsIntent, - view.context, - tracker.website, - ) - } - true + openTrackerPage.apply { + setOnClickListener { + openURL( + customTabsIntent, + view.context, + tracker.website, + ) + } + setOnLongClickListener { + copyToClipboard( + requireContext(), + tracker.website, + ) } } trackerTitleTV.text = tracker.name @@ -111,7 +112,6 @@ class TrackerDetailFragment : Fragment(R.layout.fragment_tracker_detail) { } else { trackerDescTV.visibility = View.GONE } - trackerWebURLTV.text = tracker.website // Tracker code and network signatures codeSignTV.text = tracker.code_signature diff --git a/app/src/main/res/layout/fragment_tracker_detail.xml b/app/src/main/res/layout/fragment_tracker_detail.xml index 70f9c914..3670dedd 100644 --- a/app/src/main/res/layout/fragment_tracker_detail.xml +++ b/app/src/main/res/layout/fragment_tracker_detail.xml @@ -23,6 +23,17 @@ app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_back" /> + + - - + app:layout_constraintTop_toBottomOf="@+id/trackerDescTV" /> - - - - -