From 268e7250a18b60ec49bb243d15d394d56cf0bbc8 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 3 Mar 2021 12:32:31 +0000 Subject: [PATCH] drop collapsing toolbar layout, plain toolbar is fine same as the other places --- .../ui/templates/TemplatesActivity.java | 8 +++---- .../main/res/layout/activity_templates.xml | 23 +++++-------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplatesActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplatesActivity.java index 7bc72220..ed652879 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplatesActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplatesActivity.java @@ -79,7 +79,7 @@ public class TemplatesActivity extends CrashReportingActivity 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 { @@ -87,7 +87,7 @@ public class TemplatesActivity extends CrashReportingActivity } }); - 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() @@ -125,14 +125,14 @@ public class TemplatesActivity extends CrashReportingActivity 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 diff --git a/app/src/main/res/layout/activity_templates.xml b/app/src/main/res/layout/activity_templates.xml index 30c998df..a60a650f 100644 --- a/app/src/main/res/layout/activity_templates.xml +++ b/app/src/main/res/layout/activity_templates.xml @@ -26,28 +26,17 @@ - - - - + app:layout_collapseMode="pin" + app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight" + />