fix the placement of current time indicator on weekly view

This commit is contained in:
tibbi 2017-02-11 11:46:25 +01:00
parent 1c80ffee7b
commit 19099038ad
1 changed files with 4 additions and 3 deletions

View File

@ -270,12 +270,13 @@ class WeekFragment : Fragment(), WeeklyCalendar {
activity.runOnUiThread {
mView.week_events_holder.addView(this)
val extraWidth = (todayColumn.width * 0.3).toInt()
x = todayColumn.x - extraWidth / 2
y = minutes * minuteHeight
val markerHeight = resources.getDimension(R.dimen.weekly_view_now_height).toInt()
(layoutParams as RelativeLayout.LayoutParams).apply {
width = todayColumn.width + extraWidth
height = resources.getDimension(R.dimen.weekly_view_now_height).toInt()
height = markerHeight
}
x = todayColumn.x - extraWidth / 2
y = minutes * minuteHeight - markerHeight / 2
}
}
}