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
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.
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?
Can we set background colors on a day by day basis?
current date is 12/2016 but when scroll to back calendar view month 11/2015
When I try to run it, the application closes and wont run
代碼使用
Button click event --> expCalendarView.travelTo(new DateData(2016 , 5, 5));
PS 假如是 MCalendarView.travelTo() 就可以移動
兩邊的travelTo 原碼是一樣的 init 的方法也是一樣的
I want to ask three days from my boss to be happy with my girlfriend . but the boss refuse me .
What can I do ?
Do you have a Gradle configuration I can add to my app?
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'
how to set today‘s textcolor?
To be able to use more easily
kuan哥, 我有个截屏的,感脚不错,有需求不
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!
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.
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.
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.
Can you have different colors per day, instead of all blue like you have in the demo?
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 ?
Hello @SpongeBobSun
It seems that I cant make selection on marked date, can you give me solution?
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!
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
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();
}
}
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;
}
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);
}
}
Is there a way to shade the selected day rather than mark it, like is done with the current day?
Please reply me the solution asap.
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
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.
Hi,
Is it possible to mark dates in ExpCalendarView?
Is it possible to add multiple marks to a date? like a dot and colored background? It seems only one sticks.
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 it at all possible to adapt this library to change month by scrolling up and down rather than left and right?
how to change start date from Monday please help me
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.
If a cell is previously marked(say with red color), I am unable to mark it again(say with blue color).
Please help.
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
Duplicating dynamically added marked date to previous month ..and this will be cleared when slide between 2-3 months continuously
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
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?
Is there a way to clear all the points on a ExpCalendarView?
how can customize your lib to show Solar/Persian calendar? Thanks.
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
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.