]> git.ktnx.net Git - mobile-ledger.git/commitdiff
transaction loading progress tweaks
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 16 Dec 2018 13:12:40 +0000 (13:12 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 16 Dec 2018 13:12:40 +0000 (13:12 +0000)
app/src/main/java/net/ktnx/mobileledger/TransactionListActivity.java

index 9ef8fce299f014af58d08193acf6293023995fc0..1073909dc356babd0d00625018b0681a407f5722 100644 (file)
@@ -130,6 +130,8 @@ public class TransactionListActivity extends AppCompatActivity {
 
     public void onRetrieveStart() {
         progressBar.setIndeterminate(true);
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) progressBar.setProgress(0, false);
+        else progressBar.setProgress(0);
         progressBar.setVisibility(View.VISIBLE);
     }
     public void onRetrieveProgress(RetrieveTransactionsTask.Progress progress) {
@@ -139,7 +141,6 @@ public class TransactionListActivity extends AppCompatActivity {
             progressBar.setIndeterminate(true);
         }
         else {
-            progressBar.setIndeterminate(false);
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                 progressBar.setMin(0);
             }
@@ -148,6 +149,7 @@ public class TransactionListActivity extends AppCompatActivity {
                 progressBar.setProgress(progress.getProgress(), true);
             }
             else progressBar.setProgress(progress.getProgress());
+            progressBar.setIndeterminate(false);
         }
     }