mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 15:29:18 -04:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user