From 8e3a567fad15ca92c54969e269b9b71033c8b096 Mon Sep 17 00:00:00 2001 From: Skeletrobro <67814129+baronhsieh2005@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:33:41 -0400 Subject: [PATCH] Change to OnViewCreated --- .../main/java/com/pennapps/labs/pennmobile/MenuFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MenuFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MenuFragment.kt index 0830d48a..04a00680 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MenuFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MenuFragment.kt @@ -103,11 +103,15 @@ class MenuFragment : Fragment() { pager.adapter = pageAdapter v.setBackgroundColor(Color.WHITE) mActivity.addTabs(pageAdapter as TabAdapter, pager, true) - mActivity.toolbar.visibility = View.VISIBLE mActivity.hideBottomBar() return v } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + mActivity.toolbar.visibility = View.VISIBLE + } + override fun onCreateOptionsMenu( menu: Menu, inflater: MenuInflater,