title: I want to select multiple dates in calendar in android
body: <p>I want to select multiple dates in calendar,multiple select is working fine but in toast displaying  only single date(first date).If I selected 4 days(1.8.14 to 4.8.14) all dates should be displayed in toast.
  here is my code</p>
  
  <hr>
  
  <pre><code>public class SampleTimesSquareActivity extends Activity{ 
  
            private static final String TAG="SampleTimesSquareActivity";
            private CalendarPickerView calendar;
            private AlertDialog theDialog;
            private CalendarPickerView dialogView;
            public static Date JULY;
  
            @Override
            protected void onCreate(Bundle savedInstanceState)
            {
                      super.onCreate(savedInstanceState);
                      setContentView(R.layout.sample_calendar_picker);
  
                     final Calendar nextYear = Calendar.getInstance();
                      nextYear.add(Calendar.YEAR, 1);
  
                      final Calendar lastYear = Calendar.getInstance();
                      lastYear.add(Calendar.YEAR, -1);
  
                      calendar = (CalendarPickerView) findViewById(R.id.calendar_view);
  
                      final Button multi = (Button) findViewById(R.id.button_multi);
  
  
  
                          Calendar today = Calendar.getInstance();
  
                          today.set(Calendar.DAY_OF_MONTH,
                          today.getActualMaximum(Calendar.DAY_OF_MONTH));
  
                          Date end = today.getTime();
                          ArrayList&lt;Date&gt; dates = new ArrayList&lt;Date&gt;();
                          for (int i = 0; i &lt; 5; i++) 
                          {
                            today.add(Calendar.DAY_OF_MONTH, 3);
                            dates.add(today.getTime());
                          }
                          calendar.init(new Date(),end) //
                              .inMode(SelectionMode.MULTIPLE);
  
  
                      findViewById(R.id.done_button).setOnClickListener(new OnClickListener() 
                      {
                            @Override
                            public void onClick(View view) 
                            {
                              Log.d(TAG, "Selected time in millis: " + calendar.getSelectedDate().getTime());
                              String toast = "Selected dates: " + calendar.getSelectedDate();
                              Toast.makeText(SampleTimesSquareActivity.this, toast, LENGTH_SHORT).show();
                            }
                      });
            }
  
            @Override public void onConfigurationChanged(Configuration newConfig) 
            {
                      boolean applyFixes = theDialog != null &amp;&amp; theDialog.isShowing();
                      if (applyFixes) 
                      {
                        Log.d(TAG, "Config change: unfix the dimens so I'll get remeasured!");
                        dialogView.unfixDialogDimens();
                      }
                      super.onConfigurationChanged(newConfig);
                      if (applyFixes) 
                      {
                        dialogView.post(new Runnable() 
                        {
                          @Override public void run()
                          {
                            Log.d(TAG, "Config change done: re-fix the dimens!");
                            dialogView.fixDialogDimens();
                          }
                        });
                      }
            }
  }
  </code></pre>