/*
- * Copyright © 2021 Damyan Ivanov.
+ * Copyright © 2022 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
navController.addOnDestinationChangedListener((controller, destination, arguments) -> {
if (destination.getId() == R.id.templateListFragment) {
- b.toolbarLayout.setTitle(getString(R.string.title_activity_templates));
+ b.toolbar.setTitle(getString(R.string.title_activity_templates));
b.fab.setImageResource(R.drawable.ic_add_white_24dp);
}
else {
}
});
- b.toolbarLayout.setTitle(getString(R.string.title_activity_templates));
+ b.toolbar.setTitle(getString(R.string.title_activity_templates));
b.fab.setOnClickListener(v -> {
if (navController.getCurrentDestination()
public void onDuplicateTemplate(long id) {
DB.get()
.getTemplateDAO()
- .duplicateTemplateWitAccounts(id, null);
+ .duplicateTemplateWithAccounts(id, null);
}
@Override
public void onEditTemplate(Long id) {
if (id == null) {
navController.navigate(R.id.action_templateListFragment_to_templateDetailsFragment);
- b.toolbarLayout.setTitle(getString(R.string.title_new_template));
+ b.toolbar.setTitle(getString(R.string.title_new_template));
}
else {
Bundle bundle = new Bundle();
bundle.putLong(TemplateDetailsFragment.ARG_TEMPLATE_ID, id);
navController.navigate(R.id.action_templateListFragment_to_templateDetailsFragment,
bundle);
- b.toolbarLayout.setTitle(getString(R.string.title_edit_template));
+ b.toolbar.setTitle(getString(R.string.title_edit_template));
}
}
@Override