mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
properly count the height of the week holder with day slider
This commit is contained in:
@ -156,7 +156,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
listener?.updateHoursTopMargin(mView.week_top_holder.height)
|
listener?.updateHoursTopMargin(mView.week_top_holder.height)
|
||||||
checkScrollLimits(scrollView.scrollY)
|
checkScrollLimits(scrollView.scrollY)
|
||||||
|
|
||||||
// fix some glitches like at swiping from a fully scaled out fragment will all-day events to an empty one
|
// fix some glitches like at swiping from a fully scaled out fragment with all-day events to an empty one
|
||||||
val fullFragmentHeight = (listener?.getFullFragmentHeight() ?: 0) - mView.week_top_holder.height
|
val fullFragmentHeight = (listener?.getFullFragmentHeight() ?: 0) - mView.week_top_holder.height
|
||||||
if (scrollView.height < fullFragmentHeight) {
|
if (scrollView.height < fullFragmentHeight) {
|
||||||
config.weeklyViewItemHeightMultiplier = fullFragmentHeight / 24 / defaultRowHeight
|
config.weeklyViewItemHeightMultiplier = fullFragmentHeight / 24 / defaultRowHeight
|
||||||
|
@ -257,5 +257,5 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
(viewPager!!.adapter as? MyWeekPagerAdapter)?.updateNotVisibleScaleLevel(viewPager!!.currentItem)
|
(viewPager!!.adapter as? MyWeekPagerAdapter)?.updateNotVisibleScaleLevel(viewPager!!.currentItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getFullFragmentHeight() = weekHolder!!.week_view_holder.height
|
override fun getFullFragmentHeight() = weekHolder!!.week_view_holder.height - weekHolder!!.week_view_seekbar.height - weekHolder!!.week_view_days_count_divider.height
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
android:id="@+id/week_view_view_pager"
|
android:id="@+id/week_view_view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@+id/week_view_seekbar"
|
android:layout_above="@+id/week_view_days_count_divider"
|
||||||
android:layout_toEndOf="@+id/week_view_hours_scrollview" />
|
android:layout_toEndOf="@+id/week_view_hours_scrollview" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
Reference in New Issue
Block a user