Comments (7)
I'm not sure I follow what you need. Is it possible for you to describe things further? Maybe a brief picture/diagram?
CompactCalendarView is just a view, used to display things. Events are are only really used to answer a simple question, "Hey, there's something special on this day so can you highlight it?" or "This day is no longer special, can you not highlight it anymore?". Besides, the CalendarDayEvent object contains no useful data, other than the unix time and a color for the day. It doesn't encapsulate any important data. So it is up to the client to keep track of extra data and display something interesting for a particular day.
Remember, that CompactCalendarView exposes a listener/callback hook. So, if a user selected a day, you will be notified when this happens with the date. You can then answer the question, "Is there something special on this day?". For example, you might have a booking object which has its own unix time/date and a title to say what the event is stored in a list. When a day is selected, you can iterate through the list, compare dates and display the event in the UI. Is this what your after? If so I can write some sample code if you would like in the example app.
from compactcalendarview.
Yes, thats what i want, basically i'm trying to add expenses to the calendar, when lets say when the user selects a past date, he can see all his expenses recorded π
from compactcalendarview.
Ok I can add an example when I get time. But here's one way of doing it. Keep a HashMap of Date objects to a Set for each particular day. Update the calendar with the calendar events. Set up a listener for a day click. Get the Set of Expenses using the date object. Iterate through them and add them to a Listview to display them in the UI.
from compactcalendarview.
Ahh mate... My programming skills aren't that great.. I'm still quite unfamiliar with hashmaps.. Thanks for the help though I appreciate it :)
On Jul 15, 2015, at 5:15 AM, Sundeep Kahlon [email protected] wrote:
Ok I can add an example when I get time. But here's one way of doing it. Keep a HashMap of Date objects to a Set for each particular day. Update the calendar with the calendar events. Set up a listener for a day click. Get the Set of Expenses using the date object. Iterate through them and add them to a Listview to display them in the UI.
β
Reply to this email directly or view it on GitHub.
from compactcalendarview.
Please see the sample in this branch.
from compactcalendarview.
Did you have a chance too look at the sample code? I'm gonna go ahead an close this one.
from compactcalendarview.
Thanks a lot Sundeep! This is what I was looking for! You are awesome!
Sent from Windows Mail
From: Sundeep Kahlon
Sent: βTuesdayβ, βJulyβ β21β, β2015 β1β:β46β βAM
To: SundeepK/CompactCalendarView
Cc: MishalC
Did you have a chance too look at the sample code? I'm gonna go ahead an close this one.
β
Reply to this email directly or view it on GitHub.
from compactcalendarview.
Related Issues (20)
- Swipe left and swipe right listener HOT 1
- Background color of abbreviations (weeks)
- Events from REST API
- Work on emulator but not on device
- One event on day : Big circle; multiple event on a day : Big circle + little dot
- Can I use another fonts?
- How to select more days and disable others days tap? How to enable tap only on selected days
- error with add event function
- Color description bar
- error: failed linking references.
- error: resource android:attr/lStar not found.
- using talkback
- Adding Events to CompactCalendar from api call
- Clear Selection
- How to remove the selected current date background when month is scrolled?
- How to present only 1 week ?
- How to pass Calendar as argument?
- Issue
- Events not showing in some android devices api level 33 HOT 1
- Cannot add event line indicator inside selected day circle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compactcalendarview.