remove the minY check at adding event at weekly view

This commit is contained in:
tibbi 2017-04-02 19:18:29 +02:00
parent ee00f72ab3
commit b2be9add1e
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@ import kotlinx.android.synthetic.main.fragment_week.view.*
import org.joda.time.DateTime
import org.joda.time.Days
import java.util.*
import kotlin.comparisons.compareBy
class WeekFragment : Fragment(), WeeklyCalendar {
val CLICK_DURATION_THRESHOLD = 150
@ -249,7 +248,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
text = event.title
activity.runOnUiThread {
layout.addView(this)
y = Math.max(startMinutes * minuteHeight, minScrollY.toFloat())
y = startMinutes * minuteHeight
(layoutParams as RelativeLayout.LayoutParams).apply {
width = layout.width - 1
minHeight = if (event.startTS == event.endTS) minimalHeight else (duration * minuteHeight).toInt() - 1