Skip to content

Commit

Permalink
initAppBar modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
baronhsieh2005 committed Sep 28, 2024
1 parent 7b627ac commit 9197ca1
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 9197ca1

Please sign in to comment.