From 4bf1a4fa2b01b0d6ec5df730c3b9ef45178a66a2 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 20 Jul 2018 20:57:03 +0200 Subject: [PATCH] App Details: do not show cancel X on installing/uninstalling It is not possible to cancel these, so do not show the X button. This is a hacky way to do it, but I couldn't see another way. --- .../fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java index 84bdbf378..12fe62909 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java +++ b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java @@ -378,11 +378,17 @@ public class AppDetailsRecyclerViewAdapter progressLabel.setText(resIdString); progressLabel.setContentDescription(context.getString(R.string.downloading)); progressPercent.setText(""); + if (resIdString == R.string.installing || resIdString == R.string.uninstalling) { + progressCancel.setVisibility(View.GONE); + } else { + progressCancel.setVisibility(View.VISIBLE); + } } public void setProgress(long bytesDownloaded, long totalBytes) { progressLayout.setVisibility(View.VISIBLE); buttonLayout.setVisibility(View.GONE); + progressCancel.setVisibility(View.VISIBLE); progressBar.setMax(Utils.bytesToKb(totalBytes)); progressBar.setProgress(Utils.bytesToKb(bytesDownloaded));