Tuesday, October 9, 2012

Custom Calendar in Android | Android Calendar Example with full source code

Hello dear friends,
 Today I am going to share very Important code for custom calender in Android.
Actually android not provide any calender view so its a very big draw back for developer but we can create a custom calender using grid-view.Important step is given below-
 1- Create new project e.g.-CustomCalenderAndroid
2- Create an activity MyCalendarActivity.java
3- Create layout my_calendar_view.xml
4- Create another xml file screen_gridcell.xml
 5- Add styles_calendar_events.xml in values folder
6- Add Images for calendar in drawable folder


1-Print Screen:



2-MyCalendarActivity.java


package com.examples;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;

@TargetApi(3)
public class MyCalendarActivity extends Activity implements OnClickListener {
 private static final String tag = "MyCalendarActivity";

 private TextView currentMonth;
 private Button selectedDayMonthYearButton;
 private ImageView prevMonth;
 private ImageView nextMonth;
 private GridView calendarView;
 private GridCellAdapter adapter;
 private Calendar _calendar;
 @SuppressLint("NewApi")
 private int month, year;
 @SuppressWarnings("unused")
 @SuppressLint({ "NewApi", "NewApi", "NewApi", "NewApi" })
 private final DateFormat dateFormatter = new DateFormat();
 private static final String dateTemplate = "MMMM yyyy";

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.my_calendar_view);

  _calendar = Calendar.getInstance(Locale.getDefault());
  month = _calendar.get(Calendar.MONTH) + 1;
  year = _calendar.get(Calendar.YEAR);
  Log.d(tag, "Calendar Instance:= " + "Month: " + month + " " + "Year: "
    + year);

  selectedDayMonthYearButton = (Button) this
    .findViewById(R.id.selectedDayMonthYear);
  selectedDayMonthYearButton.setText("Selected: ");

  prevMonth = (ImageView) this.findViewById(R.id.prevMonth);
  prevMonth.setOnClickListener(this);

  currentMonth = (TextView) this.findViewById(R.id.currentMonth);
  currentMonth.setText(DateFormat.format(dateTemplate,
    _calendar.getTime()));

  nextMonth = (ImageView) this.findViewById(R.id.nextMonth);
  nextMonth.setOnClickListener(this);

  calendarView = (GridView) this.findViewById(R.id.calendar);

  // Initialised
  adapter = new GridCellAdapter(getApplicationContext(),
    R.id.calendar_day_gridcell, month, year);
  adapter.notifyDataSetChanged();
  calendarView.setAdapter(adapter);
 }

 /**
  * 
  * @param month
  * @param year
  */
 private void setGridCellAdapterToDate(int month, int year) {
  adapter = new GridCellAdapter(getApplicationContext(),
    R.id.calendar_day_gridcell, month, year);
  _calendar.set(year, month - 1, _calendar.get(Calendar.DAY_OF_MONTH));
  currentMonth.setText(DateFormat.format(dateTemplate,
    _calendar.getTime()));
  adapter.notifyDataSetChanged();
  calendarView.setAdapter(adapter);
 }

 @Override
 public void onClick(View v) {
  if (v == prevMonth) {
   if (month <= 1) {
    month = 12;
    year--;
   } else {
    month--;
   }
   Log.d(tag, "Setting Prev Month in GridCellAdapter: " + "Month: "
     + month + " Year: " + year);
   setGridCellAdapterToDate(month, year);
  }
  if (v == nextMonth) {
   if (month > 11) {
    month = 1;
    year++;
   } else {
    month++;
   }
   Log.d(tag, "Setting Next Month in GridCellAdapter: " + "Month: "
     + month + " Year: " + year);
   setGridCellAdapterToDate(month, year);
  }

 }

 @Override
 public void onDestroy() {
  Log.d(tag, "Destroying View ...");
  super.onDestroy();
 }

 // Inner Class
 public class GridCellAdapter extends BaseAdapter implements OnClickListener {
  private static final String tag = "GridCellAdapter";
  private final Context _context;

  private final List<String> list;
  private static final int DAY_OFFSET = 1;
  private final String[] weekdays = new String[] { "Sun", "Mon", "Tue",
    "Wed", "Thu", "Fri", "Sat" };
  private final String[] months = { "January", "February", "March",
    "April", "May", "June", "July", "August", "September",
    "October", "November", "December" };
  private final int[] daysOfMonth = { 31, 28, 31, 30, 31, 30, 31, 31, 30,
    31, 30, 31 };
  private int daysInMonth;
  private int currentDayOfMonth;
  private int currentWeekDay;
  private Button gridcell;
  private TextView num_events_per_day;
  private final HashMap<String, Integer> eventsPerMonthMap;
  private final SimpleDateFormat dateFormatter = new SimpleDateFormat(
    "dd-MMM-yyyy");

  // Days in Current Month
  public GridCellAdapter(Context context, int textViewResourceId,
    int month, int year) {
   super();
   this._context = context;
   this.list = new ArrayList<String>();
   Log.d(tag, "==> Passed in Date FOR Month: " + month + " "
     + "Year: " + year);
   Calendar calendar = Calendar.getInstance();
   setCurrentDayOfMonth(calendar.get(Calendar.DAY_OF_MONTH));
   setCurrentWeekDay(calendar.get(Calendar.DAY_OF_WEEK));
   Log.d(tag, "New Calendar:= " + calendar.getTime().toString());
   Log.d(tag, "CurrentDayOfWeek :" + getCurrentWeekDay());
   Log.d(tag, "CurrentDayOfMonth :" + getCurrentDayOfMonth());

   // Print Month
   printMonth(month, year);

   // Find Number of Events
   eventsPerMonthMap = findNumberOfEventsPerMonth(year, month);
  }

  private String getMonthAsString(int i) {
   return months[i];
  }

  private String getWeekDayAsString(int i) {
   return weekdays[i];
  }

  private int getNumberOfDaysOfMonth(int i) {
   return daysOfMonth[i];
  }

  public String getItem(int position) {
   return list.get(position);
  }

  @Override
  public int getCount() {
   return list.size();
  }

  /**
   * Prints Month
   * 
   * @param mm
   * @param yy
   */
  private void printMonth(int mm, int yy) {
   Log.d(tag, "==> printMonth: mm: " + mm + " " + "yy: " + yy);
   int trailingSpaces = 0;
   int daysInPrevMonth = 0;
   int prevMonth = 0;
   int prevYear = 0;
   int nextMonth = 0;
   int nextYear = 0;

   int currentMonth = mm - 1;
   String currentMonthName = getMonthAsString(currentMonth);
   daysInMonth = getNumberOfDaysOfMonth(currentMonth);

   Log.d(tag, "Current Month: " + " " + currentMonthName + " having "
     + daysInMonth + " days.");

   GregorianCalendar cal = new GregorianCalendar(yy, currentMonth, 1);
   Log.d(tag, "Gregorian Calendar:= " + cal.getTime().toString());

   if (currentMonth == 11) {
    prevMonth = currentMonth - 1;
    daysInPrevMonth = getNumberOfDaysOfMonth(prevMonth);
    nextMonth = 0;
    prevYear = yy;
    nextYear = yy + 1;
    Log.d(tag, "*->PrevYear: " + prevYear + " PrevMonth:"
      + prevMonth + " NextMonth: " + nextMonth
      + " NextYear: " + nextYear);
   } else if (currentMonth == 0) {
    prevMonth = 11;
    prevYear = yy - 1;
    nextYear = yy;
    daysInPrevMonth = getNumberOfDaysOfMonth(prevMonth);
    nextMonth = 1;
    Log.d(tag, "**--> PrevYear: " + prevYear + " PrevMonth:"
      + prevMonth + " NextMonth: " + nextMonth
      + " NextYear: " + nextYear);
   } else {
    prevMonth = currentMonth - 1;
    nextMonth = currentMonth + 1;
    nextYear = yy;
    prevYear = yy;
    daysInPrevMonth = getNumberOfDaysOfMonth(prevMonth);
    Log.d(tag, "***---> PrevYear: " + prevYear + " PrevMonth:"
      + prevMonth + " NextMonth: " + nextMonth
      + " NextYear: " + nextYear);
   }

   int currentWeekDay = cal.get(Calendar.DAY_OF_WEEK) - 1;
   trailingSpaces = currentWeekDay;

   Log.d(tag, "Week Day:" + currentWeekDay + " is "
     + getWeekDayAsString(currentWeekDay));
   Log.d(tag, "No. Trailing space to Add: " + trailingSpaces);
   Log.d(tag, "No. of Days in Previous Month: " + daysInPrevMonth);

   if (cal.isLeapYear(cal.get(Calendar.YEAR)))
    if (mm == 2)
     ++daysInMonth;
    else if (mm == 3)
     ++daysInPrevMonth;

   // Trailing Month days
   for (int i = 0; i < trailingSpaces; i++) {
    Log.d(tag,
      "PREV MONTH:= "
        + prevMonth
        + " => "
        + getMonthAsString(prevMonth)
        + " "
        + String.valueOf((daysInPrevMonth
          - trailingSpaces + DAY_OFFSET)
          + i));
    list.add(String
      .valueOf((daysInPrevMonth - trailingSpaces + DAY_OFFSET)
        + i)
      + "-GREY"
      + "-"
      + getMonthAsString(prevMonth)
      + "-"
      + prevYear);
   }

   // Current Month Days
   for (int i = 1; i <= daysInMonth; i++) {
    Log.d(currentMonthName, String.valueOf(i) + " "
      + getMonthAsString(currentMonth) + " " + yy);
    if (i == getCurrentDayOfMonth()) {
     list.add(String.valueOf(i) + "-BLUE" + "-"
       + getMonthAsString(currentMonth) + "-" + yy);
    } else {
     list.add(String.valueOf(i) + "-WHITE" + "-"
       + getMonthAsString(currentMonth) + "-" + yy);
    }
   }

   // Leading Month days
   for (int i = 0; i < list.size() % 7; i++) {
    Log.d(tag, "NEXT MONTH:= " + getMonthAsString(nextMonth));
    list.add(String.valueOf(i + 1) + "-GREY" + "-"
      + getMonthAsString(nextMonth) + "-" + nextYear);
   }
  }

  /**
   * NOTE: YOU NEED TO IMPLEMENT THIS PART Given the YEAR, MONTH, retrieve
   * ALL entries from a SQLite database for that month. Iterate over the
   * List of All entries, and get the dateCreated, which is converted into
   * day.
   * 
   * @param year
   * @param month
   * @return
   */
  private HashMap<String, Integer> findNumberOfEventsPerMonth(int year,
    int month) {
   HashMap<String, Integer> map = new HashMap<String, Integer>();

   return map;
  }

  @Override
  public long getItemId(int position) {
   return position;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
   View row = convertView;
   if (row == null) {
    LayoutInflater inflater = (LayoutInflater) _context
      .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    row = inflater.inflate(R.layout.screen_gridcell, parent, false);
   }

   // Get a reference to the Day gridcell
   gridcell = (Button) row.findViewById(R.id.calendar_day_gridcell);
   gridcell.setOnClickListener(this);

   // ACCOUNT FOR SPACING

   Log.d(tag, "Current Day: " + getCurrentDayOfMonth());
   String[] day_color = list.get(position).split("-");
   String theday = day_color[0];
   String themonth = day_color[2];
   String theyear = day_color[3];
   if ((!eventsPerMonthMap.isEmpty()) && (eventsPerMonthMap != null)) {
    if (eventsPerMonthMap.containsKey(theday)) {
     num_events_per_day = (TextView) row
       .findViewById(R.id.num_events_per_day);
     Integer numEvents = (Integer) eventsPerMonthMap.get(theday);
     num_events_per_day.setText(numEvents.toString());
    }
   }

   // Set the Day GridCell
   gridcell.setText(theday);
   gridcell.setTag(theday + "-" + themonth + "-" + theyear);
   Log.d(tag, "Setting GridCell " + theday + "-" + themonth + "-"
     + theyear);

   if (day_color[1].equals("GREY")) {
    gridcell.setTextColor(getResources()
      .getColor(R.color.lightgray));
   }
   if (day_color[1].equals("WHITE")) {
    gridcell.setTextColor(getResources().getColor(
      R.color.lightgray02));
   }
   if (day_color[1].equals("BLUE")) {
    gridcell.setTextColor(getResources().getColor(R.color.orrange));
   }
   return row;
  }

  @Override
  public void onClick(View view) {
   String date_month_year = (String) view.getTag();
   selectedDayMonthYearButton.setText("Selected: " + date_month_year);
   Log.e("Selected date", date_month_year);
   try {
    Date parsedDate = dateFormatter.parse(date_month_year);
    Log.d(tag, "Parsed Date: " + parsedDate.toString());

   } catch (ParseException e) {
    e.printStackTrace();
   }
  }

  public int getCurrentDayOfMonth() {
   return currentDayOfMonth;
  }

  private void setCurrentDayOfMonth(int currentDayOfMonth) {
   this.currentDayOfMonth = currentDayOfMonth;
  }

  public void setCurrentWeekDay(int currentWeekDay) {
   this.currentWeekDay = currentWeekDay;
  }

  public int getCurrentWeekDay() {
   return currentWeekDay;
  }
 }
}

3-my_calendar_view.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/lightgray"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/buttonlayout"
        android:layout_width="fill_parent"
        android:layout_height="60sp"
        android:background="@drawable/topbar"
        android:gravity="left|top"
        android:height="60sp"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/settings"
            android:layout_width="54sp"
            android:layout_height="60sp"
            android:background="@drawable/meenu" />

        <ImageView
            android:id="@+id/prevMonth"
            android:layout_width="20sp"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            android:layout_marginLeft="10sp"
            android:src="@drawable/calendar_left_arrow_selector" >
        </ImageView>

        <TextView
            android:id="@+id/currentMonth"
            android:layout_width="fill_parent"
            android:layout_height="60sp"
            android:layout_weight="0.6"
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="#FFFFFF" >
        </TextView>

        <ImageView
            android:id="@+id/nextMonth"
            android:layout_width="20sp"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            android:layout_marginRight="10sp"
            android:src="@drawable/calendar_right_arrow_selector" >
        </ImageView>

        <Button
            android:id="@+id/addEvent"
            android:layout_width="54sp"
            android:layout_height="60sp"
            android:background="@drawable/plus" />
    </LinearLayout>

    <Button
        android:id="@+id/selectedDayMonthYear"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="@drawable/calendar_top_header"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="#FFFFFF" >
    </Button>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center" >

        <ImageView
            android:id="@+id/calendarheader"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/calendar_days" >
        </ImageView>
    </LinearLayout>

    <GridView
        android:id="@+id/calendar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:numColumns="7" >
    </GridView>

</LinearLayout>

4-screen_gridcell.xml


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/calendar_button_selector"
    android:orientation="vertical" >

    <Button
        android:id="@+id/calendar_day_gridcell"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="@drawable/calendar_button_selector"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="#FFFFFF" >
    </Button>

    <TextView
        android:id="@+id/num_events_per_day"
        style="@style/calendar_event_style"
        android:layout_width="10dip"
        android:layout_height="10dip"
        android:layout_gravity="right" >
    </TextView>

</RelativeLayout>


5-ZIP CODE(Download here!)


Hope it will help you...
Thanks...

687 comments:

  1. Kindly upload the zip.
    Thank you,
    or mail me @
    [email protected]

    ReplyDelete
    Replies
    1. Hi Vaishali,
      Please check your email.
      hope it will help you...

      Thanks,

      Delete
  2. Hi Manish,

    This is Manish Maniyar from Pune. I found your post as very effective. I am having similar type of requirement in my project. Can you please help me out by sending code to me? My mail ID is [email protected]. Thanks in advance.

    ReplyDelete
    Replies
    1. Hi Manish,
      Please check your email and your always welcome..
      Thanks..

      Delete
  3. Thanks Manish for such a quick response. I will check and revert back.

    ReplyDelete
  4. THANKS Manish...
    Looking for zip file....

    ReplyDelete
    Replies
    1. Hi Sheraz,

      Thanks for your comment please provide your email address or mail me [email protected]

      Thanks..

      Delete
  5. Hi

    Can you please send the code zip to my address -

    [email protected]

    thnkx n rgds
    Santosh

    ReplyDelete
    Replies
    1. Hi Santosh,

      Please check your email hope it will help you..

      Thanks...

      Delete
  6. Could you email me the code zip file to me,

    My email is : [email protected]


    Thanks for your help
    Justin

    ReplyDelete
    Replies
    1. Hello Justin,
      Check your email I have sent you zip code and if it will help you please comment on my blog.

      Thanks,
      Manish

      Delete
  7. Hi Manish,

    This is really very very good sample you provide us. I have to implement a customize calander in my project. I copy your project but resources are not avialable. If you plz provide a zip code or resources then it is very helpfull for me. My email address is [email protected]. Thanks is advance :)

    ReplyDelete
    Replies
    1. Please check your email I have sent you code and thanks for your valuable comment.

      Regards,
      Manish

      Delete
  8. Replies
    1. Hello Ashish,
      Please check your email I have sent you zip code and if it will help you please comment on my blog..
      Thanks,

      Delete
  9. Replies
    1. Hi,
      Thanks for your comment please check your email I have sent you code..

      Delete
  10. Hi this is a great tutorial. If you don't mind would you send your code to fhawkes at terpmail.umd.edu Thanks

    ReplyDelete
  11. Very good...

    Could you email me the code zip file to me.

    My email is : [email protected]
    Thanks for your help

    ReplyDelete
    Replies
    1. your welcome!
      Check your email, I have sent you code..
      Thanks for your comment..

      Delete
  12. Hi manish i have same requirement,can u send source code to my mail id, my mail id is [email protected]

    Thanks in advance

    ReplyDelete
  13. Hi

    Can you please send the code zip to my address -

    [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Hi Paulo!
      Check your email I have sent you code. If it will help you please comment on my blog.
      Thanks

      Delete
  14. Hi,
    Nice Calender!!
    please send the code zip to my email address -

    [email protected]
    Thanks

    ReplyDelete
    Replies
    1. Hi Thanks for your valuable comment kindly check your email I have sent you code. And if useful to you return back and comment on my blog :)

      Thanks..

      Delete
  15. Hi,
    Nice Calender, please send me the code zip
    my mail id is [email protected]

    ReplyDelete
    Replies
    1. Hi Sibin,
      Thanks for your comment kindly check your email I have sent you the zip code..

      Thanks,

      Delete
  16. hey could u please send in the zip code @ [email protected]..

    please :)

    Aditya

    ReplyDelete
  17. Hi Aditya check your email, I have sent you the code and if it useful to you please comment on my blog.

    Thanks,

    ReplyDelete
  18. Hi manish,
    Could you send me the zip file.
    mymail id :[email protected]


    Thanks,
    Arunkumar

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi Arun,
      Thanks for your comment check your email I have sent you the zip code..

      Delete
  19. Hi,

    Thanks for the tutorial. Any chance of getting the zip?

    616venom (at) gmail.com

    ReplyDelete
    Replies
    1. Hi,
      Sure you have full chance to get the zip code and thanks for your comment check your email I have sent you the zip code..

      Thanks,

      Delete
  20. Hi Mannish
    This is Trupti . Right now m working on similar Project . Will you plz send me d code my email id is : [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Hi Trupti,
      Check your email, I have sent you the zip code..

      Thanks,

      Delete
  21. Hi Manish

    Am Asraf. Can u pls send me the code to [email protected]

    ReplyDelete
    Replies
    1. Hi Asraf,
      Check your email, I have sent you the zip code and if it useful to you please comment on my blog..

      Thanks,

      Delete
  22. Awesome work...Congrats dear..can u send the copy of code to my mail ?

    [email protected]

    regards
    Arun

    ReplyDelete
    Replies
    1. Hi Arun,
      Thanks for you comment kindly check your email for the zip code..

      Thanks,

      Delete
  23. Hi Manish..
    Superb work..
    I am trying to implement Calendar view in My Application and display the events in Calendar. Can u Pls help me in doing this. my mail is [email protected]

    Regards,
    Srikanth

    ReplyDelete
    Replies
    1. Hi SriKanth, Thanks for your comment and sure I will try to help you.. What you exactly want to display on your calendar?
      Are you looking for zip code?

      Delete
  24. Can you give me your zip project ??

    ReplyDelete
    Replies
    1. Yes sure Please put your email address or make me an email at- [email protected]

      Delete
  25. Can you give me your zip project?

    My email is [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Please check your email, I have sent you zip code...

      Thanks,

      Delete
  26. Manish,
    I would like to use your code for an application that I'm working on. Can I have the zip files?
    Thanks, Juan

    ReplyDelete
    Replies
    1. Hi Juan!
      Thanks for your comment please check your email I have sent you the zip code..

      Thanks,

      Delete
  27. Hi Manish Srivastava,
    You can send for me source code application.I'm thank very much.
    My email is [email protected]

    ReplyDelete
  28. Replies
    1. Check your email I have sent you the zip code..

      Thanks,

      Delete
  29. it's very helpfull, please send code for mail [email protected]

    ReplyDelete
    Replies
    1. Hey Hung, Thanks for your comment please check your email I have sent you the zip code...

      Thanks,

      Delete
  30. Hi.
    This looks really good and as a beginner would love to have the zip. If possible would you send it to me at [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Hi Jason Thanks for kind comment.
      Yes sure you can get zip code, check your email I have sent you the zip code...

      Delete
  31. Hi,
    This is really nice calendar view. If possible Please send me the zip to [email protected].

    Thanks

    ReplyDelete
    Replies
    1. Thanks for your comment please check your email...

      Delete
  32. Hi,
    This is really a nice work..Can you please mail me the zipped project files to [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Kindly check your email I have sent you the zip code...

      Thanks..

      Delete
    2. Hi Manish,
      Many thanks for the code. Can you please send me the code to add event for a day in the calendar and how to get no of events in a day to [email protected]

      Thanks
      Mac

      Delete
    3. Sorry Mac, I don't have any code for your requirement but I can give you a small idea-

      1)Make colorful that shell in which day you have any event or events.
      2)And on click that shell open new activity for display detail list of events.

      Thanks,

      Delete
  33. hey manish plz send zip file in my mail id its [email protected]

    ReplyDelete
    Replies
    1. Hi Ronit, Check your email I have sent you the zip code..
      Thanks,

      Delete
  34. can u send me the zip file of this project...pls

    ReplyDelete
    Replies
    1. Yes sure Aditya. Let me know your email first.

      Thanks,

      Delete
  35. Hi Manish,
    Many thanks for the code. Can you please send me the zip code to add event for a day in the calendar to [email protected]

    ReplyDelete
    Replies
    1. Sorry Aditya I don't have any code for add events. You have to do it by yourself.
      I can give you a little idea only because my routine is very busy now in these days so I am sorry-

      1)Make colorful that shell in which day you have any event or events.

      2)And on click that shell open new activity for display detail list of events.

      And I am requesting you when you complete this challenge please upload it on my blog with your name so my other visitor can take help from your code...

      Thanks,

      Delete
  36. Hello Manish,

    This looks like real good stuff. It is very nice to find this kind of resources on the internet. Is there any chance you can send it to my mail? [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Hey Jonathan please check your email I have sent you the zip code and thanks for your nice comment. Really you wrote very nice.

      Thanks,

      Delete
  37. Hi Manish,
    This is very good stuff you did. Can i have your CalendarView. From So many days i am looking for it.
    Can you please send zip file of code on this email id: [email protected]

    ReplyDelete
    Replies
    1. Hi, Check your email I have sent you the zip code..

      Thanks,

      Delete
  38. Thanks for very good toturial :)
    can u please send me the zip code ?
    To [email protected]

    Thanks,
    Avi.

    ReplyDelete
    Replies
    1. Yes sure Avi, check your email I have sent you the zip code..
      Thanks..

      Delete
  39. Hi Seshu, Thanks for put nice line on my blog. Check your email I have sent you the zip code.

    ReplyDelete
  40. Good work...nice tutorial...please send me code zip below mail id
    [email protected]

    Regards
    Ketan

    ReplyDelete
    Replies
    1. Hey Ketan, Thanks for your nice comment please check your email..

      Delete
  41. Thanks for the source,it is very useful
    please send me the zip
    email: [email protected]

    ReplyDelete
    Replies
    1. Hi!
      Please check your email and let me know if you got the zip code..

      Delete
  42. Good work. it is very useful
    please send me the zip
    email: [email protected]

    ReplyDelete
  43. Hi. Thanks for sharing.
    Please send me the zip to my email : [email protected]

    ReplyDelete
    Replies
    1. Hi Khalid check your email I have sent you the zip code..

      Delete
  44. Hi Thanks for sharing..
    please send to [email protected]

    thank you

    ReplyDelete
    Replies
    1. Hi Thanks your comment please go through your email I have sent you the zip code...

      Delete
  45. Hi Manish, thank you for source, can you please send me the zip
    [email protected]

    ReplyDelete
    Replies
    1. Hi please check your email I have sent you the zip code for custom calendar.

      Delete
  46. Hi Manish nice work..can u pls tell can i put two image stripes in cell row(below date text )?

    ReplyDelete
    Replies
    1. Thanks for your comment. I don't know what you exactly want. But I think you want change background image of cell. check drawable calendar_tile.png

      Delete
  47. Hi please send me the zip project [email protected]. Thanks

    ReplyDelete
    Replies
    1. Hi Sanh,
      I have sent you the zip code please check..
      Thanks,
      Manish

      Delete
  48. Replies
    1. Please check your email I have sent you the zip code..

      Delete
  49. amazing, please send code to [email protected]
    and thank you very much..

    ReplyDelete
  50. Hi, i had so many days Checking the calender View.i'm not able to calender view. ur good job and nice work.Please send zip code to [email protected] thanks....

    ReplyDelete
    Replies
    1. Thanks for you comment Sireesha.. Check your email I have mailed you the zip code..

      Delete
  51. Replies
    1. Hi please check your email I have sent you the zip code..
      And its okay for wrong email-id, I have sent you it on right ID :)..

      Delete
  52. Hi Manish,

    please send me zip code of Custom Calendar in Android.
    My email: [email protected]

    Thanks.

    ReplyDelete
    Replies
    1. Hi Prince, Please check your email I have sent you the zip code and please accept my site for more traffic on my blog..

      Thanks,
      Manish

      Delete
  53. Replies
    1. Hi Aditya, Please check your email I have sent you the zip code and please accept my site for more traffic on my blog..

      Thanks,
      Manish

      Delete
  54. Hi Manish,
    Thanks for very good tutorial :)
    can u please send me the code zip to my id..
    [email protected].

    Thanks and Regards,

    Manish

    ReplyDelete
    Replies
    1. Hi, Please check your email I have sent you the zip code and please accept my site for more traffic on my blog..

      Thanks,
      Manish

      Delete
  55. Replies
    1. Hi Nikhil, Please check your email I have sent you the zip code and please join my site for more traffic on my blog..

      Thanks,
      Manish

      Delete
  56. can you please send the zip code. I need to have a calendar with the fetaure of being able to add an events fo my project. my email is: [email protected]
    Thanks in advance !

    ReplyDelete
    Replies
    1. Hi Irfan,
      I have sent you the zip code of my demo project please modify it according your requirements.
      And for add event you have to save it into database local or server and display it in a list on the click of a particular date..

      Delete
  57. Replies
    1. Please provide your email address to send zip code...
      and please follow my blog with your Google account..

      Delete
  58. This comment has been removed by the author.

    ReplyDelete
  59. Replies
    1. Check your email please for zip code and join or follow my blog for future update..

      Delete
  60. Hey,

    Can you send it to me too, please?
    [email protected] is my mail-adres
    Thanks!

    ReplyDelete
    Replies
    1. I have sent you the zip code please follow my blog for future update..

      Delete
  61. hello,

    I would like to get a copy of the zip file. please.
    email: [email protected]
    thanks,

    ReplyDelete
    Replies
    1. Hi Please check your email I have sent you the zip code..

      Delete
  62. Hello sir, can u please send me the code... my E-mail id: [email protected]

    ReplyDelete
    Replies
    1. Hi Namit thanks for joining my blog. Please check your email I have sent you the zip folder for custom calendar..

      Delete
  63. hi.. Manish Srivastava
    i need calendar event soruce code plz send this mail id [email protected]...

    plz help me...

    ReplyDelete
    Replies
    1. Please check your email I have sent you the zip code..

      Thanks,
      Manish

      Delete
  64. Hi manish,

    can u please send me the zip file to my mail id.. [email protected]

    Thanks.

    ReplyDelete
    Replies
    1. sir urgent please mail me the code

      Delete
    2. Hi Shanmuga,
      Please check your email I have sent you the zip code. And I am really sorry for late response..
      Thanks,
      Manish

      Delete
  65. Hi,
    Could you send me the zip file.
    mymail id : [email protected]

    ReplyDelete
  66. Hi Manish,
    Iam an avid follower of your blog, natty effective articles, I really appreciate the way you have been replaying every individual request, One among your fans. I too cant get this up and running effectively due to lack of resource Manish, Could you please mail me a copy of calender app ..

    [email protected]

    Thanks in advance

    ReplyDelete
    Replies
    1. Hi Sathya Thanks for follow my blog please check your email I have sent you the zip code..

      Thanks,
      Manish

      Delete
  67. Hi Manish,
    I read it and i think that it will help me in my project could you send me the zip file please
    my mailid:[email protected]

    ReplyDelete
    Replies
    1. Hi BIKASH,
      Please check your email I have sent you the zip code..

      Delete
  68. Hi, can you send me the zip file please:
    [email protected]

    Thanks!

    ReplyDelete
    Replies
    1. Hi Please check your email I have sent you the zip code..

      Thanks,
      Manish

      Delete
  69. Can you please send the code zip to my address -

    [email protected]

    ReplyDelete
  70. It is very useful and help me in my project

    Could you please send me the zip file to my email.

    [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Hi Besty Please check your email I have sent you the zip code..
      Thanks,

      Delete
  71. Hi manish

    nice tutorial.it will helps me a lot
    Could you please send me the zip file to my email.
    [email protected]

    Thanks

    ReplyDelete
    Replies
    1. Thanks Tangudu for your nice comment please check your email I have sent you the zip code..

      Thanks,
      Manish

      Delete
  72. Could you email me the code zip file to me,

    My email is : [email protected]


    Thanks for your help

    ReplyDelete
  73. Hi Manish,
    Very helpful, Could you please send me the zip file to my email:
    [email protected]

    ReplyDelete
    Replies
    1. Thanks for your comment . I have sent you the zip code at your email please check and confirm...
      Thanks,

      Delete
  74. hello sir i am akash ,i have similar requirement please send me its .zip .

    ReplyDelete
  75. hello sir,
    Thanks for such a informative example and a great blog !!
    I tried implementing this but I'm facing a lot of difficulties .It would be really helpful if you could pls mail me the example zip at
    [email protected]

    Thanks a lot !

    ReplyDelete
    Replies
    1. Hi Rachit!
      Thanks for your nice words on my blog please check your email for zip code..

      Thanks,

      Delete
  76. Replies
    1. Hi Yasir please check your email I have sent you zip code..

      Delete
  77. Hi,
    Great job!
    I find it very useful,
    Can you please send me .zip project?

    e- mail [email protected]
    Thanks in Advance!

    ReplyDelete
    Replies
    1. Hi Justice Thanks for your nice comment please check your email for zip code..

      Delete
  78. Replies
    1. Hi Rajnish sure I will please check your email..
      Thanks,

      Delete
  79. This comment has been removed by the author.

    ReplyDelete
  80. Hi...
    Its look really nice.. very good work friend...
    can u send me the zip file to my mail id "[email protected]"

    ReplyDelete
    Replies
    1. Hi Veera please check your email I have sent you the zip code.
      Thanks..

      Delete
  81. Very helpful, Could you please send me the zip file to [email protected]

    ReplyDelete
    Replies
    1. Hello Dipal Please check your email I have sent you the zip code..

      Delete
  82. Hi,Could you please send me the zip file.

    mymail id : [email protected]

    thx :)

    ReplyDelete
    Replies
    1. Hi Sure Mouayed Please check your email I have sent you the zip code..

      Delete
  83. helpful.can u send me the zip project to my id [email protected]

    ReplyDelete
  84. Hi..
    It's really nice and helpful.. if possible, could u please send me the zip file to my email [email protected] , thanks :)

    ReplyDelete
    Replies
    1. Thanks for your comment I have sent you the zip project..
      Enjoy...

      Delete
  85. Replies
    1. Hi Gourav Please check your email I have sent you code..

      Delete
  86. It's a very nice and helpful tutorial and I wish you would sent me the zip file of the application... my email is [email protected] , thank you very much :)

    ReplyDelete
    Replies
    1. Hi Criss your email address got bounce again and again please send me correct email address.
      Thanks,

      Delete
  87. Good job Manish. I didnt see the code for the styles and drawables.
    Can you send to me at [email protected]

    ReplyDelete
    Replies
    1. Hi drew thanks for your comment please check your email I have sent you the zip project for custom calendar..
      Thanks,

      Delete
  88. Hi Manish

    Can you please send the code zip to my address -

    ReplyDelete
  89. Hi Manish

    Can you please send the code zip to my address -
    [email protected]

    ReplyDelete
  90. please send me zip file urgently needed.... [email protected]

    ReplyDelete
    Replies
    1. Hi Mukesh I have sent you the zip code Enjoy coding...

      Thanks,

      Delete
  91. Please send zip file to [email protected]
    Thanks very much.
    Joe

    ReplyDelete
    Replies
    1. Hi joe check your email I save sent you the zip code..

      Thanks,

      Delete
  92. Hi Manish,

    Can you please send me the zip file to my address :

    [email protected]

    Thanks a lot.

    ReplyDelete
    Replies
    1. Yes sure!
      Check your email please..

      Thanks,

      Delete
    2. hi.

      Can you please send me the zip file to my address :

      [email protected]

      Thanks a lot.

      Delete