Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate information on tracker detail fragment #382

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 12 additions & 16 deletions app/src/main/res/layout/fragment_tracker_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_back" />

<ImageButton
android:id="@+id/openTrackerPage"
android:layout_width="48dp"
android:layout_height="48dp"
android:backgroundTint="@android:color/transparent"
android:contentDescription="@string/open_tracker_page"
android:src="@drawable/ic_website"
app:layout_constraintBottom_toBottomOf="@+id/toolbarTD"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/toolbarTD" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackerTitleTV"
android:layout_width="match_parent"
Expand Down Expand Up @@ -78,21 +89,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trackerPresenceTV" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackerWebURLTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:ellipsize="end"
android:maxLines="2"
android:paddingHorizontal="40dp"
android:textColor="?android:textColorPrimary"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trackerDescTV"
tools:text="https://www.huaweicentral.com/hms-core/" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackerDetectTV"
android:layout_width="match_parent"
Expand All @@ -106,7 +102,7 @@
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trackerWebURLTV" />
app:layout_constraintTop_toBottomOf="@+id/trackerDescTV" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/codeDetectTV"
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/menu/tracker_detail_menu.xml

This file was deleted.