Comments (9)
Are you talking about event indicator in the sample? There is a line in the code which removes the event on day click:
This has the effect of removing the event from the calendar so it will no longer display it.
from compactcalendarview.
i want it to be removed when that date is selected but i want it to reappear when i click other date
from compactcalendarview.
Then delete that line in the sample code. It will no longer remove the event from the calendar.
from compactcalendarview.
yes but is there any way to hide the indicator only when it is selected, then on clicking other day it will be visible again?
from compactcalendarview.
Sorry I don't quite understand. Lets start from the beginning. What is it exactly you need to do?
There are 3 types of indicators. No. 1 indicator for events (small circle below day in the sample). No. 2 indicator for the current day (dark red in sample) and No. 3 indicator for currently selected day (light red in sample).
Which one of these do you want to show when an event is selected?
The calendar will draw the light red circle when ever you select a day except when you select the current day (No. 2 dark circle) even if there is an event indicator.
from compactcalendarview.
im talking about the small one for events (ie No. 1). initailly when the sample code is executed they are shown. but when i click on the date which has event, the small indicator disappears on that particular date and when i click on other date it never appears again on that date. so is there any way to make the small indicator appear on that date again when i choose other date?
from compactcalendarview.
i solved it by adding addEvents(compactCalendarView); like this:
@OverRide
public void onDayClick(Date dateClicked) {
date.setText(dateFormatForMonth.format(dateClicked));
List bookingsFromMap = bookings.get(dateClicked);
mutableBookings.clear();
if(bookingsFromMap != null){
Log.d("MainActivity", bookingsFromMap.toString());
for(Booking booking : bookingsFromMap){
mutableBookings.add(booking.title);
}
}
addEvents(compactCalendarView);
compactCalendarView.removeEvent(new CalendarDayEvent(dateClicked.getTime(), Color.argb(255, 169, 68, 65)), true);
adapter.notifyDataSetChanged();
}
sorry for all the trouble and thanks :)
from compactcalendarview.
Are you running the sample code? This seems to be working fine for me as long as you delete/comment out line 80 in the MainActvitiy class.
from compactcalendarview.
Yep thats the line which removes events. I'm going to remove that line from the MainAcitivty to get rid of any confusion :).
Thanks.
from compactcalendarview.
Related Issues (20)
- rage date
- Update events inside a http request callback
- Creating CustomAdapter
- 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?
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.