Your splash screen should read "...Calendar" in the first line below the blue separation line.
I located the error in the third paragraph of code listed above; in "main.xml" locate the line which is the offending line, as you can see. Please correct it. Thank you.
Little things like that are important and say a lot about a programmer. Like how much he cares about the accuracy of his programs.
Discussion on:
View:
Show:
While I agree it doesn't work properly on an emulator, I did find it difficult to even compile & build at first. What you might want to mention is to make sure all your Android SDKs (especially the 4.0 and above versions) are up to date. I had an early version of the 4.0 build, and as such the compiler wouldn't recognize R.layout.main , R.id.next , and R.id.previous as valid values. When I installed the updates to 4.0 and 4.0.3. it would recognized them. Note the current update for 4.0 is missing a kernal file, but 4.0.3 works (API 15).
You have your class as Main, yet when I try to run this way, the program just crashes with Class Not Found: com.authorwjf.calsample.CalendarContractActivity
This can be easily fixed simply my renaming the class as CalendarContractActivity (as well as the java file name). Again this just makes it runnable. The Prev and Next button will do nothing and the date will stay in January of 1969, probably due to reasons you mentioned in your article.
You also have the @Override annotation for the <nClick(View v) routine. Eclipse says not to as you only add it when you are overriding a superclass method. So just remove the annotation for the routine.
Also running it the first time may result in failure. If this happens, just close the emulator and try running it again. Something about initial setup I think is causing the install to fail.
You have your class as Main, yet when I try to run this way, the program just crashes with Class Not Found: com.authorwjf.calsample.CalendarContractActivity
This can be easily fixed simply my renaming the class as CalendarContractActivity (as well as the java file name). Again this just makes it runnable. The Prev and Next button will do nothing and the date will stay in January of 1969, probably due to reasons you mentioned in your article.
You also have the @Override annotation for the <nClick(View v) routine. Eclipse says not to as you only add it when you are overriding a superclass method. So just remove the annotation for the routine.
Also running it the first time may result in failure. If this happens, just close the emulator and try running it again. Something about initial setup I think is causing the install to fail.
Thanks for the updates. I wasn't aware that earlier builds of the Android 4.0 SDK might give users problems so I appreciate you sharing that experience.
Thanks! Very Interesting!
It would be great to also have an example of writing in the calendar.
It would be great to also have an example of writing in the calendar.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle

































