Skip to content

Commit 413dcee

Browse files
Merge pull request #278 from appdevforall/fix/ADFA-4910-wizard-extract-reading
ADFA-4910 fix(install): reading indicator on the detail line, keep the extract legend
2 parents 3bfdc79 + 44721c2 commit 413dcee

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,18 @@ private void showInstallProgress(InstallState st) {
219219
installBar.setProgress(st.percent);
220220
installDetail.setText(st.percent + "%" + (st.speed.isEmpty() ? "" : " · " + st.speed));
221221
} else if (st.phase == InstallState.Phase.EXTRACTING) {
222+
// Keep the "Extracting System…" legend on the status line for both sub-phases.
223+
installStatus.setText(org.iiab.controller.deploy.domain.ExtractProgress.firstLine(
224+
getString(R.string.install_status_extracting)));
222225
if (st.percent < 0) {
223226
// ADFA-4915: "reading/listing" sub-phase. listEntries() scans the whole archive
224-
// (~1 min; longer on low-end devices), so show an animated "reading …" + an
225-
// indeterminate bar instead of a frozen 0%.
226-
startReadingEllipsis(getString(R.string.k2go_reading));
227+
// (~1 min; longer on low-end devices). Indeterminate bar + an animated "reading …"
228+
// on the DETAIL line (where the % goes), not on the status legend.
227229
installBar.setIndeterminate(true);
228-
installDetail.setText("");
230+
startReadingEllipsis(getString(R.string.k2go_reading));
229231
} else {
230232
// ADFA-4915: determinate extract — real % plus just the current file's basename
231233
// (no internal path, no counter): one ellipsized line that never overlaps.
232-
installStatus.setText(org.iiab.controller.deploy.domain.ExtractProgress.firstLine(
233-
getString(R.string.install_status_extracting)));
234234
installBar.setIndeterminate(false);
235235
installBar.setProgress(st.percent);
236236
String name = org.iiab.controller.deploy.domain.ExtractProgress.fileLabel(st.message);
@@ -516,21 +516,22 @@ private void stopBootEllipsis() {
516516
ellipsisRunnable = null;
517517
}
518518

519-
/** ADFA-4915: animate "reading" + . / .. / … while the archive is being listed. Reuses the
520-
* ellipsis handler (boot and reading never run at once) without touching {@code bootBaseText}. */
519+
/** ADFA-4915: animate "reading" + . / .. / … on the DETAIL line while the archive is being
520+
* listed. Reuses the ellipsis handler (boot and reading never run at once) without touching
521+
* {@code bootBaseText}. */
521522
private void startReadingEllipsis(final String base) {
522523
stopBootEllipsis();
523524
ellipsisRunnable = new Runnable() {
524525
int i = 0;
525526
final String[] frames = {" ", ". ", ".. ", "..."}; // 0..3 dots, fixed 3-slot width (monospace)
526527
@Override public void run() {
527-
if (installStatus != null) {
528+
if (installDetail != null) {
528529
String suffix = frames[i % frames.length];
529530
android.text.SpannableString sp = new android.text.SpannableString(base + " " + suffix);
530531
sp.setSpan(new android.text.style.TypefaceSpan("monospace"),
531532
base.length() + 1, base.length() + 1 + suffix.length(),
532533
android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
533-
installStatus.setText(sp);
534+
installDetail.setText(sp);
534535
}
535536
i++;
536537
ellipsisHandler.postDelayed(this, 450L);

0 commit comments

Comments
 (0)