import android.widget.AutoCompleteTextView;
import android.widget.EditText;
import android.widget.FilterQueryProvider;
+import android.widget.ProgressBar;
import android.widget.SimpleCursorAdapter;
import android.widget.TableLayout;
import android.widget.TableRow;
import java.util.Objects;
+/*
+ * TODO: auto-fill of transaction description
+ * if Android O's implementation won't work, add a custom one
+ * TODO: nicer progress while transaction is submitted
+ * TODO: periodic and manual refresh of available accounts
+ * (now done forcibly each time the main activity is started)
+ * TODO: latest transactions, maybe with browsing further in the past?
+ * TODO: reports
+ * TODO: get rid of the custom session/cookie and auth code?
+ * (the last problem with the POST was the missing content-length header)
+ * TODO: app icon
+ * TODO: nicer swiping removal with visual feedback
+ * TODO: activity with current balance
+ * TODO: setup wizard
+ * TODO: update accounts/check settings upon change of backend settings
+ * */
+
public class NewTransactionActivity extends AppCompatActivity implements TaskCallback {
private TableLayout table;
private FloatingActionButton fab;
+ private ProgressBar progress;
private TextView text_date;
private TextView text_descr;
private static SaveTransactionTask saver;
new_transaction_save_clicked(view);
}
});
+ progress = findViewById(R.id.save_transaction_progress);
+
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
table = findViewById(R.id.new_transaction_accounts_table);
for (int i = 0; i < table.getChildCount(); i++) {
public void new_transaction_save_clicked(View view) {
fab.setEnabled(false);
+ progress.setVisibility(View.VISIBLE);
saver = new SaveTransactionTask(this);
@Override
public void done() {
fab.setEnabled(true);
+ progress.setVisibility(View.INVISIBLE);
reset_form();
}