mirror of
				https://github.com/SimpleMobileTools/Simple-Calendar.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	avoid a glitch with showing the current time view twice at weekly view
This commit is contained in:
		| @@ -56,6 +56,7 @@ class WeekFragment : Fragment(), WeeklyCalendar { | |||||||
|     private var wasExtraHeightAdded = false |     private var wasExtraHeightAdded = false | ||||||
|     private var dimPastEvents = true |     private var dimPastEvents = true | ||||||
|     private var selectedGrid: View? = null |     private var selectedGrid: View? = null | ||||||
|  |     private var currentTimeView: ImageView? = null | ||||||
|     private var events = ArrayList<Event>() |     private var events = ArrayList<Event>() | ||||||
|     private var allDayHolders = ArrayList<RelativeLayout>() |     private var allDayHolders = ArrayList<RelativeLayout>() | ||||||
|     private var allDayRows = ArrayList<HashSet<Int>>() |     private var allDayRows = ArrayList<HashSet<Int>>() | ||||||
| @@ -372,7 +373,12 @@ class WeekFragment : Fragment(), WeeklyCalendar { | |||||||
|         if (todayColumnIndex != -1) { |         if (todayColumnIndex != -1) { | ||||||
|             val minutes = DateTime().minuteOfDay |             val minutes = DateTime().minuteOfDay | ||||||
|             val todayColumn = getColumnWithId(todayColumnIndex) |             val todayColumn = getColumnWithId(todayColumnIndex) | ||||||
|             (inflater.inflate(R.layout.week_now_marker, null, false) as ImageView).apply { |             if (currentTimeView != null) { | ||||||
|  |                 mView.week_events_holder.removeView(currentTimeView) | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             currentTimeView = (inflater.inflate(R.layout.week_now_marker, null, false) as ImageView) | ||||||
|  |             currentTimeView!!.apply { | ||||||
|                 applyColorFilter(primaryColor) |                 applyColorFilter(primaryColor) | ||||||
|                 mView.week_events_holder.addView(this, 0) |                 mView.week_events_holder.addView(this, 0) | ||||||
|                 val extraWidth = (todayColumn.width * 0.3).toInt() |                 val extraWidth = (todayColumn.width * 0.3).toInt() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user