question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with set event

See original GitHub issue

Hello, I have 2 dates: 15-01-2015 14:00, timestamp: 1421330400 15-01-2015 15:00, timestamp: 1421334000 and I want to set Event like this: @Override public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {

    List<WeekViewEvent> events = new ArrayList<WeekViewEvent>();

    GregorianCalendar startTime = new GregorianCalendar();
    startTime.setTimeInMillis(1421330400*1000);
    GregorianCalendar endTime = new GregorianCalendar();
    endTime.setTimeInMillis(1421334000*1000);

    WeekViewEvent event = new WeekViewEvent(1, getEventTitle(startTime), startTime.get(Calendar.YEAR) , startTime.get(Calendar.MONTH), startTime.get(Calendar.DAY_OF_MONTH), startTime.get(Calendar.HOUR_OF_DAY), startTime.get(Calendar.MINUTE), endTime.get(Calendar.YEAR) , endTime.get(Calendar.MONTH), endTime.get(Calendar.DAY_OF_MONTH), endTime.get(Calendar.HOUR_OF_DAY), endTime.get(Calendar.MINUTE));
    event.setColor(getResources().getColor(R.color.event_color_01));
    events.add(event);

    return events;
}

but event don’t show on calendar, how to do this?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:31 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
entropitorcommented, Jan 16, 2015

onMonthChange is called three times (when you don’t scroll) This is in the README!

Please remember that the calendar pre-loads events of three consecutive months to enable lag-free scrolling.

That’s why it’s being shown multiple times.

(You have to take in account the newMonth and newYear variables. They are there for a reason)

0reactions
alamkanakcommented, Mar 27, 2015

Answer from @caske33 is correct

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows: Under what circumstances might SetEvent() not ...
This indicates that the problem is not with SetEvent(), but something deeper. No idea what, yet, but it's good not to be chasing...
Read more >
7 Major Event Planning Problems and How to Solve Them
#3. Choosing the venue. ... Selecting the perfect venue which suits your event is arguably one of the most important things in event...
Read more >
Common Event Planning Problems and Their Simple Solutions
Problem: Attracting a crowd during the winter months. · Problem: Losing guests' attention. · Solution: Create event excitement. · Problem: Uncooperative weather.
Read more >
Event Planning Problems and Solutions - MeetingPlay
Event planning mistakes happen! But we've got you covered - here are 9 common event planning mistakes, and how to avoid them.
Read more >
create event(V4) data error - Power Platform Community
I'm trying to create a calendar for Outlook "create event(V4)". Triggered data is Dataverse. I have set "DateOnly" data type for my date....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found