Lines Matching defs:event

103     private static final long INVALID_EVENT_ID = -1; //This is used for remembering a null event
106 // duration of the more allday event text fade
127 * ID of the last event which was displayed with the toast popup.
129 * This is used to prevent popping up multiple quick views for the same event, especially
130 * during calendar syncs. This becomes valid when an event is selected, either by default
131 * on starting calendar or by scrolling to an event. It becomes invalid when the user
132 * explicitly scrolls to an empty time slot, changes views, or deletes the event.
285 /** Width of a day or non-conflicting event */
319 // This is the standard height of an allday event with no restrictions
322 * This is the minimum desired height of a allday event.
340 // The largest a single allDay event will become.
379 // smallest height to draw an event with
443 * Flag to decide whether to handle the up event. Cases where up events
455 * The height of the allday event area used during animation
459 * The height of an individual allday event during animation
540 * Indicates we just received the touch event and we are waiting to see if
583 // whether or not an event is stopping because it was cancelled
848 // Catch long clicks for creating a new event
873 // jump to the "View event" screen.
972 // target hour + 1 (to give it room to see the event) -
1190 // indicating presence of an all-day event.
1209 // If there is at most one all-day event per day, then use less
1210 // space (but more than the space for a single event).
1225 // continues to hide the last event so the more events text can
1291 //When we get new events we don't want to dismiss the popup unless the event changes
1332 * Switch to another view based on what was selected (an event or a free
1346 // With track ball, if we selected a free slot, then create an event.
1347 // If we selected a specific event, switch to EventInfo view.
1370 // unambiguous event, then view that event. Otherwise go to
1383 // If we selected a free slot, then create an event.
1384 // If we selected an event, then go to the EventInfo view.
1407 public boolean onKeyUp(int keyCode, KeyEvent event) {
1409 long duration = event.getEventTime() - event.getDownTime();
1438 // if (event.isTracking() && !event.isCanceled()) {
1445 return super.onKeyUp(keyCode, event);
1449 public boolean onKeyDown(int keyCode, KeyEvent event) {
1475 // Delete the selected event, if any
1492 if (event.getRepeatCount() == 0) {
1493 event.startTracking();
1496 return super.onKeyDown(keyCode, event);
1554 return super.onKeyDown(keyCode, event);
1592 return super.onKeyDown(keyCode, event);
1597 public boolean onHoverEvent(MotionEvent event) {
1599 int action = event.getAction();
1611 Log.e(TAG, "Unknown hover event action. " + event);
1618 return super.onHoverEvent(event);
1620 if (event.getAction() != MotionEvent.ACTION_HOVER_EXIT) {
1621 setSelectionFromPosition((int) event.getX(), (int) event.getY());
1660 // Read out the relevant event(s)
1668 // Read out x of numEvents if there are more than one event
1677 // Read out x of numEvents if there are more than one event
1691 AccessibilityEvent event = AccessibilityEvent
1694 event.getText().add(msg);
1695 event.setAddedCount(msg.length());
1696 sendAccessibilityEventUnchecked(event);
1889 // the all-day event area.
1891 // before jumping to the all-day event area.
1893 // 12am before going up to the all-day event area.
2009 // Compute the layout relation between each event before measuring cell
2020 // the earliest event in each day.
2028 Event event = events.get(ii);
2029 if (event.startDay > mLastJulianDay || event.endDay < mFirstJulianDay) {
2032 if (event.drawAsAllday()) {
2034 final int firstDay = Math.max(event.startDay, mFirstJulianDay);
2035 final int lastDay = Math.min(event.endDay, mLastJulianDay);
2043 int daynum = event.startDay - mFirstJulianDay;
2044 int durationDays = event.endDay - event.startDay + 1;
2056 int daynum = event.startDay - mFirstJulianDay;
2057 int hour = event.startTime / 60;
2062 // Also check the end hour in case the event spans more than
2064 daynum = event.endDay - mFirstJulianDay;
2065 hour = event.endTime / 60;
2409 // Draw a "new event hint" on top of the highlight
2410 // For the week view, show a "+", for day view, show "+ New event"
2614 // There is no event at the selected hour, so create a new event.
2632 Event event = Event.newInstance();
2633 event.startDay = julianDay;
2634 event.endDay = julianDay;
2635 event.startMillis = utcMillis;
2636 event.endMillis = event.startMillis + MILLIS_PER_HOUR;
2637 event.startTime = minutesSinceMidnight;
2638 event.endTime = event.startTime + MINUTES_PER_HOUR;
2639 return event;
2709 * Return the layout for a numbered event. Create it if not already existing
2711 private StaticLayout getEventLayout(StaticLayout[] layouts, int i, Event event, Paint paint,
2723 if (event.title != null) {
2725 bob.append(drawTextSanitizer(event.title.toString(), MAX_EVENT_TEXT_LEN - 1));
2729 if (event.location != null) {
2730 bob.append(drawTextSanitizer(event.location.toString(),
2734 switch (event.selfAttendeeStatus) {
2736 paint.setColor(event.color);
2750 // Leave a one pixel boundary on the left and right of the rectangle for the event
2808 // We draw one fewer event than will fit so that more events text
2819 Event event = events.get(i);
2820 int startDay = event.startDay;
2821 int endDay = event.endDay;
2836 // Prevent a single event from getting too big
2842 // event rectangle.
2843 event.left = computeDayLeftPosition(startIndex);
2844 event.right = computeDayLeftPosition(endIndex + 1) - DAY_GAP;
2845 event.top = y + height * event.getColumn();
2846 event.bottom = event.top + height - ALL_DAY_EVENT_RECT_BOTTOM_MARGIN;
2848 // check if we should skip this event. We skip if it starts
2851 if (event.top >= allDayEventClip) {
2854 } else if (event.bottom > allDayEventClip) {
2859 event.bottom = allDayEventClip;
2862 Rect r = drawEventRect(event, canvas, p, eventTextPaint, (int) event.top,
2863 (int) event.bottom);
2865 StaticLayout layout = getEventLayout(mAllDayLayouts, i, event, eventTextPaint, r);
2868 // Check if this all-day event intersects the selected day
2871 mSelectedEvents.add(event);
2891 // to the normal event area, we will highlight the topmost event.
2945 // For each event in the selected event list "mSelectedEvents", find
2950 // Find the event in the same row as the previously selected all-day
2951 // event, if any.
3007 Event event = events.get(i);
3008 if (!geometry.computeEventRect(date, left, top, cellWidth, event)) {
3013 if (event.bottom < mViewStartY || event.top > viewEndY) {
3018 && geometry.eventIntersectsSelection(event, selectionArea)) {
3019 mSelectedEvents.add(event);
3022 Rect r = drawEventRect(event, canvas, p, eventTextPaint, mViewStartY, viewEndY);
3029 StaticLayout layout = getEventLayout(mLayouts, i, event, eventTextPaint, r);
3041 // Computes the "nearest" neighbor event in four directions (left, right,
3073 // Check if the previously selected event intersects the previous
3074 // selection box. (The previously selected event may be from a
3102 // The previously selected event was to the right of us.
3106 // The previously selected event was to the left of us.
3110 // The previously selected event was above us.
3114 // The previously selected event was below us.
3119 // For each event in the selected event list "mSelectedEvents", search
3157 // Pick the starting event closest to the previously selected event,
3328 private Rect drawEventRect(Event event, Canvas canvas, Paint p, Paint eventTextPaint,
3332 r.top = Math.max((int) event.top + EVENT_RECT_TOP_MARGIN, visibleTop);
3333 r.bottom = Math.min((int) event.bottom - EVENT_RECT_BOTTOM_MARGIN, visibleBot);
3334 r.left = (int) event.left + EVENT_RECT_LEFT_MARGIN;
3335 r.right = (int) event.right;
3337 int color = event.color;
3338 switch (event.selfAttendeeStatus) {
3356 r.top = Math.max((int) event.top + EVENT_RECT_TOP_MARGIN + floorHalfStroke, visibleTop);
3357 r.bottom = Math.min((int) event.bottom - EVENT_RECT_BOTTOM_MARGIN - ceilHalfStroke,
3367 // If this event is selected, then use the selection color
3368 if (mSelectedEvent == event) {
3372 // Also, remember the last selected event that we drew
3373 mPrevSelectedEvent = event;
3377 // Also, remember the last selected event that we drew
3378 mPrevSelectedEvent = event;
3392 // r.top = (int) event.top + CALENDAR_COLOR_SQUARE_V_OFFSET;
3393 // r.left = (int) event.left + CALENDAR_COLOR_SQUARE_H_OFFSET;
3404 // p.setColor(event.color);
3408 r.top = (int) event.top + EVENT_RECT_TOP_MARGIN;
3409 r.bottom = (int) event.bottom - EVENT_RECT_BOTTOM_MARGIN;
3410 r.left = (int) event.left + EVENT_RECT_LEFT_MARGIN;
3411 r.right = (int) event.right - EVENT_RECT_RIGHT_MARGIN;
3473 // past the event rect. The current fix is to not draw the staticLayout
3522 Event event = mSelectedEvent;
3524 titleView.setText(event.title);
3527 imageView.setVisibility(event.hasAlarm ? View.VISIBLE : View.GONE);
3530 imageView.setVisibility(event.isRepeating ? View.VISIBLE : View.GONE);
3533 if (event.allDay) {
3544 String timeRange = Utils.formatDateRange(mContext, event.startMillis, event.endMillis,
3550 final boolean empty = TextUtils.isEmpty(event.location);
3552 if (!empty) whereView.setText(event.location);
3746 // event
3756 // If the tap is on an event, launch the "View event" view
3765 // Y location is affected by the position of the event in the scrolling
4163 // If there is a selected event, then allow it to be viewed and
4190 // them to create an event. They can also do this by tapping.
4199 // If there is a selected event, then allow it to be viewed and
4295 // Get the calendar id for this event
4392 // Log.i("Cal", " num events: " + mSelectedEvents.size() + " event: "
4430 Event event = events.get(i);
4431 if (!event.drawAsAllday() ||
4432 (!mShowAllAllDayEvents && event.getColumn() >= maxUnexpandedColumn)) {
4437 if (event.startDay <= mSelectionDay && event.endDay >= mSelectionDay) {
4444 float eventTop = yOffset + height * event.getColumn();
4447 // If the touch is inside the event rectangle, then
4448 // add the event.
4449 mSelectedEvents.add(event);
4450 closestEvent = event;
4453 // Find the closest event
4461 closestEvent = event;
4483 Event event = events.get(i);
4484 // Compute the event rectangle.
4485 if (!geometry.computeEventRect(date, left, top, cellWidth, event)) {
4489 // If the event intersects the selection region, then add it to
4491 if (geometry.eventIntersectsSelection(event, region)) {
4492 mSelectedEvents.add(event);
4513 // event. They could be different if we touched on an empty hour
4514 // slot very close to an event in the previous hour slot. In
4515 // that case we will select the nearby event.