mobile: show loading progress in title bar

This commit is contained in:
fkloft
2014-01-03 18:49:47 +01:00
parent 1f47ca87dd
commit a1d03ec69b
3 changed files with 33 additions and 9 deletions

View File

@ -206,4 +206,22 @@ public class IITC_JSInterface {
}
});
}
@JavascriptInterface
public void setProgress(final double progress) {
mIitc.runOnUiThread(new Runnable() {
@Override
public void run() {
if (progress != -1) {
// maximum for setProgress is 10,000
mIitc.setProgressBarIndeterminate(false);
mIitc.setProgress((int) Math.round(progress * 10000));
}
else {
mIitc.setProgressBarIndeterminate(true);
mIitc.setProgress(1);
}
}
});
}
}