+ TransactionListActivity getContext() {
+ return contextRef.get();
+ }
+
+ public static class Params {
+ static final int DEFAULT_LIMIT = 100;
+ private SharedPreferences backendPref;
+ private String accountsRoot;
+ private int limit;
+
+ public Params(SharedPreferences backendPref) {
+ this.backendPref = backendPref;
+ this.accountsRoot = null;
+ this.limit = DEFAULT_LIMIT;
+ }
+ Params(SharedPreferences backendPref, String accountsRoot) {
+ this(backendPref, accountsRoot, DEFAULT_LIMIT);
+ }
+ Params(SharedPreferences backendPref, String accountsRoot, int limit) {
+ this.backendPref = backendPref;
+ this.accountsRoot = accountsRoot;
+ this.limit = limit;
+ }
+ String getAccountsRoot() {
+ return accountsRoot;
+ }
+ SharedPreferences getBackendPref() {
+ return backendPref;
+ }
+ int getLimit() {
+ return limit;
+ }
+ }
+
+ public class Progress {
+ public static final int INDETERMINATE = -1;
+ private int progress;
+ private int total;
+ Progress() {
+ this(INDETERMINATE, INDETERMINATE);
+ }
+ Progress(int progress, int total) {
+ this.progress = progress;
+ this.total = total;
+ }
+ public int getProgress() {
+ return progress;
+ }
+ protected void setProgress(int progress) {
+ this.progress = progress;
+ }
+ public int getTotal() {
+ return total;
+ }
+ protected void setTotal(int total) {
+ this.total = total;
+ }