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.
This commit is contained in:
Hans-Christoph Steiner 2018-07-20 20:57:03 +02:00
parent a1edfdfc8d
commit 4bf1a4fa2b

View File

@ -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));