Data.profile.addObserver((o, arg) -> {
MobileLedgerProfile profile = Data.profile.get();
runOnUiThread(() -> {
- if (profile == null) toolbar.setSubtitle("");
- else toolbar.setSubtitle(profile.getName());
+ if (profile == null) setTitle(R.string.app_name);
+ else setTitle(profile.getName());
});
});
item.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg));
}
- setTitle(item.getText());
-
@ColorInt int transparent = getResources().getColor(android.R.color.transparent);
LinearLayout actions = drawer.findViewById(R.id.nav_actions);
}
}
}
- public void onViewClicked(View view) {
- switch (view.getId()) {
- case R.id.clearAccountNameFilter:
- if (transactionListFragment != null)
- transactionListFragment.onClearAccountNameClick(view);
- break;
- default:
- Log.e("click", String.format("View %d click not handled", view.getId()));
- }
- }
public void onAccountSummaryClicked(View view) {
drawer.closeDrawers();
// fragmentManager.popBackStack(0, FragmentManager.POP_BACK_STACK_INCLUSIVE);
}
private void showTransactionsFragment(LedgerAccount account) {
+ TransactionListFragment.accountFilter.set(account.getName());
mViewPager.setCurrentItem(1, true);
// FragmentTransaction ft = fragmentManager.beginTransaction();
// if (transactionListFragment == null) {