Added bottom navigation view (currently unpopulated) and changed logic for pages

This commit is contained in:
denizk0461
2023-04-12 10:49:30 +02:00
parent a37b6dfd0b
commit 7da43dc2b7
11 changed files with 113 additions and 53 deletions
@@ -67,8 +67,8 @@ class EventFragment : Fragment() {
binding.recyclerView.onFlingListener = null
pagerSnapHelper.attachToRecyclerView(binding.recyclerView)
// binding.recyclerView.scheduleLayoutAnimation()
binding.recyclerView.scrollToPosition(dayOfWeek)
binding.dayTabs.getTabAt(dayOfWeek)?.select()
switchToCurrentDayView()
}
binding.fab.setOnClickListener { view ->
@@ -107,12 +107,29 @@ class EventFragment : Fragment() {
// }
}
override fun onResume() {
super.onResume()
switchToCurrentDayView()
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
private fun switchToCurrentDayView() {
binding.recyclerView.scrollToPosition(dayOfWeek)
binding.dayTabs.getTabAt(dayOfWeek)?.select()
}
private fun launchWebview() {
findNavController(this).navigate(R.id.action_FirstFragment_to_SecondFragment)
}
/**
* Highlights the current or next course.
*/
private fun highlightCurrentCourse() {
}
}