From 5530f8e0a593c27ee6575c0ef756a4dd00a4aed5 Mon Sep 17 00:00:00 2001 From: LooKeR Date: Wed, 20 Oct 2021 00:17:39 +0530 Subject: [PATCH] Update: Change Toolbar title based on app --- src/main/kotlin/com/looker/droidify/screen/ProductFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/looker/droidify/screen/ProductFragment.kt b/src/main/kotlin/com/looker/droidify/screen/ProductFragment.kt index 6b989459..3f451b9c 100644 --- a/src/main/kotlin/com/looker/droidify/screen/ProductFragment.kt +++ b/src/main/kotlin/com/looker/droidify/screen/ProductFragment.kt @@ -105,7 +105,7 @@ class ProductFragment() : ScreenFragment(), ProductAdapter.Callbacks { val toolbar = view.findViewById(R.id.toolbar)!! screenActivity.onToolbarCreated(toolbar) - toolbar.setTitle(R.string.application) + toolbar.title = getString(R.string.application) this.toolbar = toolbar toolbar.menu.apply { @@ -187,6 +187,7 @@ class ProductFragment() : ScreenFragment(), ProductAdapter.Callbacks { layoutManagerState = null if (firstChanged || productChanged) { this.products = products + toolbar.title = products[0].first.name } if (firstChanged || installedItemChanged) { installed = installedItem.value?.let {