From 9197ca110b4b0373ce2fe2c89869d4e9542165b6 Mon Sep 17 00:00:00 2001 From: Skeletrobro <67814129+baronhsieh2005@users.noreply.github.com> Date: Sat, 28 Sep 2024 15:08:21 -0400 Subject: [PATCH] initAppBar modifications --- .../pennmobile/morefragments/MoreFragment.kt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/morefragments/MoreFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/morefragments/MoreFragment.kt index cc93d3bf..1eb1ad44 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/morefragments/MoreFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/morefragments/MoreFragment.kt @@ -12,7 +12,6 @@ import androidx.preference.PreferenceManager import com.pennapps.labs.pennmobile.MainActivity import com.pennapps.labs.pennmobile.R import com.pennapps.labs.pennmobile.components.collapsingtoolbar.ToolbarBehavior -import com.pennapps.labs.pennmobile.databinding.FragmentHomeBinding import com.pennapps.labs.pennmobile.databinding.FragmentMoreBinding import com.pennapps.labs.pennmobile.utils.Utils @@ -36,7 +35,11 @@ class MoreFragment : Fragment() { ): View { _binding = FragmentMoreBinding.inflate(inflater, container, false) val v = binding.root - initAppBar(v) + binding.dateView.text = Utils.getCurrentSystemTime() + ( + binding.appbarHome.layoutParams + as CoordinatorLayout.LayoutParams + ).behavior = ToolbarBehavior() return v } @@ -52,15 +55,6 @@ class MoreFragment : Fragment() { .commit() } - private fun initAppBar(view: View) { - binding.dateView.text = Utils.getCurrentSystemTime() - // Appbar behavior init - ( - binding.appbarHome.layoutParams - as CoordinatorLayout.LayoutParams - ).behavior = ToolbarBehavior() - } - override fun onResume() { val initials = PreferenceManager