spongebobsun / mcalendarview Goto Github PK
View Code? Open in Web Editor NEWCustomizable & Shrinkable Calendar Widget for Android
License: Apache License 2.0
Customizable & Shrinkable Calendar Widget for Android
License: Apache License 2.0
I am adding points as the calendar scrolls to another month. However, the calendar doesn't refresh and show those new points unless it's closed an open again. Is there a way around this?
Hi man, we have the possibility of translate the names that days of week in WeekColumnView?
I saw the code of WeekColumnView, it is used the method "ExpCalendarUtil.number2Week", but the names are in hardcode.
Thanks
Can you have different colors per day, instead of all blue like you have in the demo?
代碼使用
Button click event --> expCalendarView.travelTo(new DateData(2016 , 5, 5));
PS 假如是 MCalendarView.travelTo() 就可以移動
兩邊的travelTo 原碼是一樣的 init 的方法也是一樣的
There has a memory leak problem in MonthFragment.class
I add this code in it.
@Override
public void onDestroyView() {
super.onDestroyView();
if (mAdapter != null)
MarkedDates.getInstance().deleteObserver(mAdapter);
monthData = null;
unbindDrawables(mFragmentView);
}
private void unbindDrawables(View view) {
if (view.getBackground() != null) {
view.getBackground().setCallback(null);
}
if (view instanceof ViewGroup && !(view instanceof AdapterView)) {
for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {
unbindDrawables(((ViewGroup) view).getChildAt(i));
}
((ViewGroup) view).removeAllViews();
}
}
Do you have a Gradle configuration I can add to my app?
when i want a caleendar hightlighting, If you don't switch a few times a month, have no effect
, after thedrag , the date which you want will hightlighting . please! why? thanks!
how can customize your lib to show Solar/Persian calendar? Thanks.
Hello @SpongeBobSun
It seems that I cant make selection on marked date, can you give me solution?
how to change start date from Monday please help me
your project is very good, but please follow the conventions of Java classes should begin with a capital,
http://www.oracle.com/technetwork/java/codeconventions-135099.html
To be able to use more easily
Please reply me the solution asap.
Hi.
CalendarUtil.position2Year(int pos) method has logical error.
problem :
2014/11 <- 2015/12 -> 2016/1
i modified this method
....
else {
ret = tmpYear - ((500 - pos)+tmpMonth)/12;
}
to
...
else {
ret = tmpYear - ((500-pos)/12);
}
This works normally.
Hello.
I use ExpCalendar and my custom datecellview.
My datecellview contain date text and some images
and I want to display some image in my datecellview when user click date.
How can I access specific date(clicked by user) and display something ?
The Application seems to crash when Marking current date in ExpCalendarView.
03-08 17:33:38.834 30477-30477/sun.bob.mcalendarviewtest E/AndroidRuntime: FATAL EXCEPTION: main
Process: sun.bob.mcalendarviewtest, PID: 30477
java.lang.ClassCastException: sun.bob.mcalendarview.views.DefaultMarkView cannot be cast to sun.bob.mcalendarview.views.ExpandCellView
at sun.bob.mcalendarview.adapters.CalendarExpAdapter.getView(CalendarExpAdapter.java:70)
at android.widget.AbsListView.obtainView(AbsListView.java:2349)
at android.widget.GridView.makeAndAddView(GridView.java:1433)
at android.widget.GridView.makeRow(GridView.java:361)
at android.widget.GridView.fillDown(GridView.java:302)
at android.widget.GridView.fillFromTop(GridView.java:437)
at android.widget.GridView.layoutChildren(GridView.java:1276)
at android.widget.AbsListView.onLayout(AbsListView.java:2153)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1692)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1468)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1627)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15686)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5891)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Thanks
Hi Developer,
I am using three tabs. Expandable Calendar is used on the first tab. If I slide to the second tab and then back to the first tab there is no issue. but if I slide to the third tab and then back to the first the week which was visible just disappears. All the dates are visible on either side of the hidden week view.
To make the view visible again I have to slide twice on either side of the calendar and the hidden week then becomes visible.
Can you please advise. Thank you
Is it possible to add multiple marks to a date? like a dot and colored background? It seems only one sticks.
Is it at all possible to adapt this library to change month by scrolling up and down rather than left and right?
When I try to run it, the application closes and wont run
I am trying to use ExpCalendarView inside a Fragment. And there is a Navigation drawer to switch different fragments. The problem is, the ExpCalendarView will be loaded successfully at first time. But when I chose another fragment from navigation drawer and then switched back, the ExpCalendarView will disappear. That area for the calendar will be blank.
I want to ask three days from my boss to be happy with my girlfriend . but the boss refuse me .
What can I do ?
i solved this issue just add notifyObservers() to brlove method in MarkedDates.java
public MarkedDates add(DateData dateData){
data.add(dateData);
this.setChanged();
notifyObservers();
return this;
}
current date is 12/2016 but when scroll to back calendar view month 11/2015
Hello, my app need to mark date is more, so I plan to make a single month (when sliding into this month) to dynamically increase the marking date, how to notify the view?
my code for example,but the current view can't refresh
calendarView.setOnMonthChangeListener(new OnMonthChangeListener() {
@OverRide
public void onMonthChange(int year, int month,int position) {
//改变标题栏
getActivity().setTitle(year + " " + month + "月");
//模拟标记数据
calendarView.markDate(year, month,month/2+7);
calendarView.markDate(year, month,month/2+13);
calendarView.markDate(year, month,month/2+20);
}
}
kuan哥, 我有个截屏的,感脚不错,有需求不
Can we have two kinds of day in two different types of calendar format into one cell ??
it may look like this:
http://www.ashesh.com.np/images/Nepali-Calendar.png
Thank you for your good libraries, but i want to know how can I set European standard of calendars ?
For example, I want that weekColumn started from Monday, not Sunday ???
Thank you for your attention.
If a cell is previously marked(say with red color), I am unable to mark it again(say with blue color).
Please help.
Is there a way to unmark all dates at once?
I have a number to dates marked, would like to clear all marked dates and mark new set of dates.
I try to populate event from my database and set markDate to mCalendarView, my question is, how to clear all markDate? because I want to populate and display new event into calendar view.
Please help me. thanks.
So I set up the project with the updated code. I'm looping through all the days and putting the appropriate color on that day... however, it keeps crashing. IMHO it looks as if the bug is assassinated with setting the the color on the current date.
I was able to test this by checking if the date I want to set the color for is today and skipping it... No crash.
To reproduce set up an expandable calendar view and attempt to set set the mark style to leftbar and a color...
Thanks!
Can we set background colors on a day by day basis?
Hi,
Any idea how to animate the transition between the expand & shrink state? Specifically, I am looking for how to slide down/up?
Thanks for the great lib!
Currently, i want to customize calendar that can select multiple date.
How should i do?
Hi developer, I am trying to utilize that the shrink expandable calendarview. I have used two onDateClick listeners, one for the month scroll and the other for date selection. If I only use the month scroll that the markDate is visible but I also need to assess the date which user has selected to perform certain functions. Can you please advise in this regard. Thanks.
Hi Developer,
How can I set
1.ExpCalendarView default to ShrinkView ( WeekView )
2.Set DateCellView background to custom drawable or any color.
3.Set MinDate or Max Date. (Disable previous days to select).
Can you please advise. Thanks.
Is there a way to clear all the points on a ExpCalendarView?
how to set today‘s textcolor?
Duplicating dynamically added marked date to previous month ..and this will be cleared when slide between 2-3 months continuously
Is there a way to shade the selected day rather than mark it, like is done with the current day?
Hi,
Is it possible to mark dates in ExpCalendarView?
Can you put the build compile on the homepage so I don't have to look up if theres a new build it's just there on the read me.
compile 'com.github.SpongeBobSun:mCalendarView:6c384cdc8b'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.