public static ObservableValue<Boolean> updating = new ObservableValue<>();
public static void scheduleTransactionListReload(Activity act) {
- boolean hasFilter =
- act.findViewById(R.id.transaction_list_account_name_filter).getVisibility() ==
- View.VISIBLE;
+ View filter = act.findViewById(R.id.transaction_list_account_name_filter);
+ if (filter == null) return;
+ boolean hasFilter = filter.getVisibility() == View.VISIBLE;
String accFilter = hasFilter ? String.valueOf(
((AutoCompleteTextView) act.findViewById(R.id.transaction_filter_account_name))
.getText()) : null;
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright © 2018 Damyan Ivanov.
+ ~ Copyright © 2019 Damyan Ivanov.
~ This file is part of Mobile-Ledger.
~ Mobile-Ledger is free software: you can distribute it and/or modify it
~ under the term of the GNU General Public License as published by
tools:context="net.ktnx.mobileledger.ui.activity.MainActivity"
android:id="@+id/menu_transaction_list_filter"
android:icon="@drawable/ic_filter_list_white_24dp"
- android:onClick="onOptionsMenuClicked"
android:title="Filter"
app:showAsAction="always" />
</menu>
\ No newline at end of file