tyczj / extendedcalendarview Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I have completelly follow your instruction But layout not Load in My App. I have try to find solution But still not get correct .
I Have following error
com.tyczj.extendedcalendarview.ExtendedCalendarView failed to instantiate.
and project not run on emulator error
Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER
[2014-05-30 14:43:14 - MyCalendarApp] Please check logcat output for more details.
[2014-05-30 14:43:14 - MyCalendarApp] Launch canceled!
I need to be able to fire the onItemClickListener for the current day on activity creation. How can I do this?
HI Thanks for the sharing!
This really is what I really want! I am a student and I have to write a calendar with adding event!
But I can’t open the project with the emulator at api19 ,4.4.2 version.
The apk was install scuccessfully but even the icon didn't show up at the emulator!
I don't know what to do and I really need this for research!
Could you tell me that what is the configuration of the emulator when you run the apps?
Thank you!
I'm trying to import your library to my project
i'm using eclipse, and i did this by going to my project properties > add library > android classpath container > ExtendedCalendarView.
then I added the snippet you used in "Usage" to my layout.xml, but i get this error:
The following classes could not be found.
and when i use only the .jar file that is in the bin folder i get this error:
The following classes could not be instantiated.
how exactly do i import this library ? and when i do, how do i create an instance of this class without getting "instantiation" error ?
I am unable to tell if recurring events are supported. If they are not, any plans to support them?
Hi
I'm trying to use your project inside my app. So I was wondering if it is enough to just add the jar file available in the bin folder to add the project as a library. When I tried it I got a classNotFoundException about R$Drawable. Is there something I am missing?
How do you advise to add your project as a library?
Hi! I'm trying to show daily view for one android Aplication. I decided to use the library ExtendedCalendarView and I can't make it run.
What I'm doing?
First of all, I downloaded the library from github and import into my workspace. Then, I import de library to my project. It seems to be well imported (with the green tick).
In my MainActivity.java I'm not doing nothing:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
In my design XML files I have the code to show the xml. (It's the same that are in the github):
<com.tyczj.extendedcalendarview.ExtendedCalendarView
android:id="@+id/calendar"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
Fially, in the AndroidManifest.xml I declare the ContentProvider into the tag:
<provider
android:name="com.tyczj.extendedcalendarview.CalendarProvider"
android:authorities="com.tyczj.extendedcalendarview.cAlEndarprovider" />
What is happening?
When compile the error, the APP crash with this error message on the log:
FATAL EXCEPTION: AsyncTask #1 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:299) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) at java.util.concurrent.FutureTask.setException(FutureTask.java:124) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)Caused by: java.lang.SecurityException: Permission Denial: opening provider com.tyczj.extendedcalendarview.CalendarProvider from ProcessRecord{42dc32a8 8394:com.jcasadella.testcalendar/u0a145} (pid=8394, uid=10145) requires signature or signature at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2561) at android.app.ActivityThread.acquireProvider(ActivityThread.java:4347) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:1836) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1129) at android.content.ContentResolver.query(ContentResolver.java:378) at android.content.ContentResolver.query(ContentResolver.java:336) at com.tyczj.extendedcalendarview.Day$GetEvents.doInBackground(Day.java:122) at com.tyczj.extendedcalendarview.Day$GetEvents.doInBackground(Day.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
What are my research?
I searched a lot of pages (stackoverflow) and others and I can't found nobody with this error.
It seems to be some permission I forgot. For the moment I never used ContentProvider and maybe the problem are here...
I read documentation in android developers oficial page and now I'm little confused for why the library are using ContentProvider.
Questions or issuses
The questions I have are:
Can use this library without using ContentProvider? Saving the events in sqlite or in memory... If I can, please point me to right direction.
What is the reason of the error I write beffore? Can someone point me a possible solution?
Solution progress
I tested the same APP in other device and it was working! I don't know what is happening:
Samusng Galaxy S3 (phone Android 4.3) -> Works perfectly
Samsung Tab 3 (tablet Android 4.1) -> permission denial error.
This APP will ned to work in a tablet tab3 with android between 4.1 and 4.3.
Thanks all for this library and in advance for the solution ;)
Joan.
After completing the steps outlined in the instruccions of GitHub (Usage section), I have tried to add events but it doesn't show on my calendar.
Can you give me an example of ExtendedCalendarView? Thanks in advance! Best regards.
Hello,
I've been trying to implement OnDayClickListener in order to display a list of events for the selected day.
But I have not been able to succed. Could you please provide an example?
Thanks in advance
I just deleted this line
c.close();
and the code works :)
At present the project does not appear to define a version for the artifacts produced by the project. For example, in current pre-release state it would be good to version the project as 1.0-SNAPSHOT.
I will be working on this issue in my fork at https://github.com/farrukhnajmi/ExtendedCalendarView
Given that most new projects are now using gradle for build I am inclined to used gradle in my proposed commit for this issue in my own branch. Project contributors(s) please let me know if you have any suggestions or input. Thanks.
I wanted a functionality where we add events to the day and show it on the day_view itself. But the problem is if the event description is large or their are more than one events added to a day, the gridview height doesn't increase, rather the day item height increases and overlaps over the other day items in that column. Is there any way to resolve this issue?
Hello, kindly tell me how to do the following, providing explanation with a code snippet will be very useful for me.
Thank you very much for the useful library, kindly answer my questions :)
Thanks for the fast Reply, im inserting values i can see its working now, though the colors are not correct and im not quiet sure on how the insertion format of the data should look like, right now i have:
ContentValues values = new ContentValues();
values.put(CalendarProvider.COLOR, EventsCalendar.COLOR_PURPLE);
values.put(CalendarProvider.DESCRIPTION, "Some Description");
values.put(CalendarProvider.LOCATION, "Some location");
values.put(CalendarProvider.EVENT, "Event name");
Calendar cal = Calendar.getInstance();
Day day = new Day(mActivity, 17, 2014, 1);
cal.set(2014, 1, 17, 0, 0);
values.put(CalendarProvider.START, cal.getTimeInMillis());
values.put(CalendarProvider.START_DAY, day.getDay());
TimeZone tz = TimeZone.getDefault();
cal.set(2014, 1, 17, 22, 10);
int endDayJulian = Time.getJulianDay(cal.getTimeInMillis(),
TimeUnit.MILLISECONDS.toSeconds(tz.getOffset(cal
.getTimeInMillis())));
values.put(CalendarProvider.END, cal.getTimeInMillis());
values.put(CalendarProvider.END_DAY, endDayJulian);
Uri uri = mActivity.getContentResolver().insert(
CalendarProvider.CONTENT_URI, values);
I live in a country where time is 00:00 to 23:59, can you show me an example of how to insert data
like today event start: 17-02-2014 10:00 event end: 17-02-2014 23:00?
Another question, i have to make the day View my self right? :)
Any way thanks, the extended calendar view is very cool!
Hello,
I love this project and will definitely use it (and help out where possible). I can see though that yhirano is maintaining a very active Fork of this project where he is constantly adding features, support and bugfixes.
Are there any plans on doing a merge?
Please tell me a way to include Month with Year on Title between next previous buttons
The method setOnCreateContextMenuListener(OnDayContextMenuListener contextListener) is unusable sometimes.
For example:
someFragment extneds Fragment implements OnDayContextMenuListener {
// Some code ...
calendarView.setOnCreateContextMenuListener(this) // generates compile time error
}
better name could be setOnDayContextMenuListener(OnDayContextMenuListener listener)
Greetz!
Hi,
The day titles are not handled correct for the different resolutions in my case, im running the example in different emulators
Hello,
firstly thanks a lot for such an amazing calendar, but could you help me in making the calendar looks like the first pic that is included in calendar library (Screenshot_2014-01-10-19-57-06_framed). I mean add separator between days and adding the dots under the day number.
thank you in advance.
Hello,
I'm having trouble figuring out how to bring up a toast to when a day is clicked. I can add assignments to the calendar, but I want to know how to implement a day click listener.
Can you help me out with that?
Thanks
In my application I wanted to extend projects CalendarAdapter class in a CalendarAdapterExt class defined by my app. I wanted this class to have access to key members of the CalendarAdapter class.
In addition I need a ExtendedCalendarView.setAdapter method to allow setting a custom CalendarAdapter on the ExtendedCalendarView.
This patch makes these two changes that allowed me to set a custom CalendarAdapter on the ExtendedCalendarView and also to extend the current CalendarAdapter.
Jeff, I am having trouble understanding github fork/branch/create pull request model so please consider above commit as a Pull Request. Thanks.
Steps to reproduce:
Expected result: No day should show selected
Actual result: Same cell gets selected in new month
I mean the small dot's in every day that have appointment in it.
Hi,
I have added an event on a particular date but when I run the project, that date does not show the colour bar. Can you help me with a similar example.I already tried the code that you have explained in the readme file.
Hello ,
I have successfully stored the event on the day
now I want to show the details of the event whenever user clicks on that day on the our calendar.
Hi there,
I'm using this library but having difficult adding events.
Could you provide an example INTEGER for the values in the line of code in the title?
Can you provide sample project that uses ExtendedCalendarView and integrates your library in Eclipse ?
my layout.xml file throws these errors ( I added project dependency, jar file to path)
The following classes could not be instantiated:
java.lang.ClassNotFoundException: com.tyczj.extendedcalendarview.R$drawable
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(AccessController.java:-2)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.tyczj.extendedcalendarview.ExtendedCalendarView.init(ExtendedCalendarView.java:82)
at com.tyczj.extendedcalendarview.ExtendedCalendarView.(ExtendedCalendarView.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.instantiateClass(ProjectCallback.java:422)
at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(ProjectCallback.java:179)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:755)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:373)
Thanks for a great project. What is the license associated with it? I suggest posting license information on the project. Please consider Apache Software License 2.0 if you do not have any strong preference as that seems most easy for corporate lawyers to accept:
hi , I want to change the first day of week ,
I have tried to change the variable in CalendarAdapter to FIRST_DAY_OF_WEEK = 7 ( I want to start the week from SAT ) ,
but every thing went wrong !
I know this has been an opened/closed issue here for a while, but I still cannot get this to work correctly. I followed the instructions for importing the whole project into my workspace, but I can't seem to get it to work. Could you please help? It seems the JAR file in bin disappears after trying to export it, as per the directions on the link you provided. Thanks.
I am using Eclipse
row 135 : cursor.close() --> Must be inside the if block because cursor can be null there -> leads to NPE.
Hi, I tried to use ExtendedCalendarView in my project.
I follwed your instructions to import classes in my project: first import all the project in my workspace, then add it as library in my personal project, importing the jar located in ExtendedCalendarView-master\ExtendedCalendarView\bin .There are no errors in Eclipse, I declared also the provider in the manifest as you said, but when I launch my app on my device, I have this runtime error of nullPointerException:
05-13 18:30:07.880: E/AndroidRuntime(7243): java.lang.RuntimeException: Unable to get provider com.tyczj.extendedcalendarview.CalendarProvider: java.lang.ClassNotFoundException: com.tyczj.extendedcalendarview.CalendarProvider
could you give me some help? Thanks
Hello,
I may be doing something stupid, but I can't seem to get the events to display correctly on the calendar. I have put in the following code:
ContentValues values = new ContentValues();
values.put(CalendarProvider.COLOR, Event.COLOR_RED);
values.put(CalendarProvider.DESCRIPTION, "Some Description");
values.put(CalendarProvider.LOCATION, "Some location");
values.put(CalendarProvider.EVENT, "Event name");
Calendar cal = Calendar.getInstance();
FragmentActivity context = getActivity();
Day day = new Day(context, 26, 2014, 1);
cal.set(2014, 1, 26, 0, 0);
values.put(CalendarProvider.START, cal.getTimeInMillis());
values.put(CalendarProvider.START_DAY, day.getDay());
TimeZone tz = TimeZone.getDefault();
cal.set(2014, 1, 28, 0, 0);
int endDayJulian = Time.getJulianDay(cal.getTimeInMillis(), TimeUnit.MILLISECONDS.toSeconds(tz.getOffset(cal.getTimeInMillis())));
values.put(CalendarProvider.END, cal.getTimeInMillis());
values.put(CalendarProvider.END_DAY, endDayJulian);
Uri uri = context.getContentResolver().insert(CalendarProvider.CONTENT_URI, values);
But it is adding event icons in for every day and not just the specified, as shown in the image
Like I said, might be something small I'm missing, but I've been at it for a while now and I just can't see it.
Thanks
Andy
Wish to use on academic project. Could you attach an MIT license (or whatever as long as its not GPL) to this library please?
I will add Turkish bundle to this project , if you want I can send it to you.
Hi.
I was using your library in an app I was developing using Android Studio. Everything was fine.
I decided to change the development to Eclipse but now when I try to run an app just with the view of the calendar and nothing more this happens:
07-26 22:01:11.575: E/AndroidRuntime(521): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pp/com.example.pp.MainActivity}: android.view.InflateException: Binary XML file line 11: Error inflating class com.tyczj.extendedcalendarview.ExtendedCalendarView
Your library is correctly added as you said in previous issues:
. Right-click the project and go to Properties.
. Then select Android and add the imported ExtendedCalendarView project as a library.
. Click Apply.
Can you help me?
Is this possible to change month view to week view ?
Hi man !!
I've tried with no success show Monday - Sunday week order instead of Sunday - Saturday.
I'm new in Android and that is difficult for me.
I think it could be a good feature to implement in your custom calendar, lots of countries starts their week on Monday :)
Bye and thanks for your awesome calendar!!
Can I link calendar to my own DB, without making ContentProvider?
How to click on any day (which has event) using Robotium in android ? I want to test if event has correct details ?
Is there any way to implement onClickListener on dates.
What I've tried is below, but Toast won't display
ExtendedCalendarView newCalendar = (ExtendedCalendarView)findViewById(R.id.calendar);
newCalendar.setOnDayClickListener(new OnDayClickListener() {
@OverRide
public void onDayClicked(AdapterView<?> adapter, View view, int position,
long id, Day day) {
Toast.makeText(getApplicationContext(), "Clicked", Toast.LENGTH_SHORT).show();
}
});
Hi, I am having a wired problem, I followed your instructions and successfully set an Event in the calendar and it worked like a charm in my GenyMotion emulator but when I the same in my Nexus 5 and HTC Desire VC, the calendar displays but the events are not being displayed. I am Confused. Kindly help me...
Here is the code I used
calendar = (ExtendedCalendarView) getView().findViewById(R.id.calendar);
calendar.setOnDayClickListener(this);
lvEvents = (ListView) getView().findViewById(R.id.lvEvents);
// Adding events
ContentValues values = new ContentValues();
values.put(CalendarProvider.COLOR, Event.COLOR_RED);
values.put(CalendarProvider.DESCRIPTION, "20 th Annual Day");
values.put(CalendarProvider.LOCATION, "Samskara Academy");
values.put(CalendarProvider.EVENT, "Annual Day");
Calendar cal = Calendar.getInstance();
TimeZone tz = TimeZone.getDefault();
// Day julianStartDay = new Day(getActivity(), 25, 2014, 04);
cal.set(2014, 04, 25, 9, 0);
int julianDay = Time.getJulianDay(cal.getTimeInMillis(), cal
.getTimeZone().getOffset(0));
values.put(CalendarProvider.START, cal.getTimeInMillis());
values.put(CalendarProvider.START_DAY, julianDay);
cal.set(2014, 04, 25, 13, 0);
int endDayJulian = Time.getJulianDay(cal.getTimeInMillis(),
TimeUnit.MILLISECONDS.toSeconds(tz.getOffset(cal
.getTimeInMillis())));
values.put(CalendarProvider.END, cal.getTimeInMillis());
values.put(CalendarProvider.END_DAY, endDayJulian);
// Uri uri =
getActivity().getContentResolver().insert(CalendarProvider.CONTENT_URI,
values);
This is the screenshot of my genymotion device (Look at 25th May)
And here is the screenshot of my Nexus 5
Kindly help me. Did I make any mistake in my code?
I posted a reply to ur answer, I mentioned that i did the import the correct way later, but i still got the (The following classes could not be instantiated) error
I thought u wouldnt get a notification for a closed issue so i created this.
now that i did the import the correct way, i really don't understand why do i still get this error. I added some of the Stack Trace in my reply to the first issue if u r interested.
Please help
I meet an error. "invalid resource directory name: E:\Java\AndroidWorkSpaceNew\ExtendedCalendarView\bin\res/crunch". How to deal with it?
Hello,
I have a problem with implementation in my project.
Here is my error:
02-10 15:03:35.608: E/AndroidRuntime(26933): Caused by: java.lang.SecurityException: Permission Denial: opening provider com.tyczj.extendedcalendarview.CalendarProvider from ProcessRecord{4561ad78 26933:cz.titio.calnedartest/u0a10104} (pid=26933, uid=10104) that is not exported from uid 10079
Thanks for you help!
Would like to ask if there is any way to retrieve all the dates from the calendar, I am trying to parse dates into JSON which will then change the colour of the event depending on the status, thank you!
How to set a particular date in ExtendedViewCalendar?
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.