Merge "[PB14] Cosmetic fixes to the progress bar"
commit
37bbaea8a1
|
@ -78,6 +78,8 @@
|
||||||
<com.android.inputmethod.dictionarypack.ButtonSwitcher
|
<com.android.inputmethod.dictionarypack.ButtonSwitcher
|
||||||
android:id="@+android:id/wordlist_button_switcher"
|
android:id="@+android:id/wordlist_button_switcher"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
|
android:layout_marginStart="13dip"
|
||||||
|
android:layout_marginLeft="13dip"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -123,6 +123,7 @@ public class DictionaryDownloadProgressBar extends ProgressBar {
|
||||||
final UpdateHelper updateHelper = new UpdateHelper();
|
final UpdateHelper updateHelper = new UpdateHelper();
|
||||||
final Query query = new Query().setFilterById(mId);
|
final Query query = new Query().setFilterById(mId);
|
||||||
int lastProgress = 0;
|
int lastProgress = 0;
|
||||||
|
setIndeterminate(true);
|
||||||
while (!isInterrupted()) {
|
while (!isInterrupted()) {
|
||||||
final Cursor cursor = mDownloadManager.query(query);
|
final Cursor cursor = mDownloadManager.query(query);
|
||||||
if (null == cursor) {
|
if (null == cursor) {
|
||||||
|
@ -156,6 +157,7 @@ public class DictionaryDownloadProgressBar extends ProgressBar {
|
||||||
private int mProgress;
|
private int mProgress;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
setIndeterminate(false);
|
||||||
setProgress(mProgress);
|
setProgress(mProgress);
|
||||||
}
|
}
|
||||||
public void setProgressFromAnotherThread(final int progress) {
|
public void setProgressFromAnotherThread(final int progress) {
|
||||||
|
|
Loading…
Reference in New Issue