title: Changing the layout of DatePicker
body: <p>Is there any way to reformat the datePicker so that instead of getting "mm/dd/yyyy" you can get "dd/mm/yyyy" or even "dd/mm/yy"</p>
  
  <p>This is my current code.</p>
  
  <pre><code>import android.app.Activity;
  import android.app.DatePickerDialog;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.DatePicker;
  import android.widget.EditText;
  import android.widget.TextView;
  import android.view.View.OnClickListener;
  import android.app.DatePickerDialog.OnDateSetListener;
  import java.util.Calendar;
  
  
  /**
   * Created by MOS182 on 7/21/13.
   */
  public class AddReminder extends Activity {
  
      TextView Title, Amount, PaymentDate, ReminderDate, ReminderTime;
      EditText eTitle, eAmount, ePaymentDate, eReminderDate, eReminderTime;
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
  
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.reminders_dialog);
          initializeVariables();
  
          ePaymentDate.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  //To show current date in the datepicker
                  Calendar mcurrentDate = Calendar.getInstance();
                  int mYear = mcurrentDate.get(Calendar.YEAR);
                  int mMonth = mcurrentDate.get(Calendar.MONTH);
                  int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);
  
                  DatePickerDialog mDatePicker;
                  mDatePicker = new DatePickerDialog(AddReminder.this, new OnDateSetListener() {
                      public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {
                          // TODO Auto-generated method stub
                      /*      Your code   to get date and time    */
                          selectedmonth = selectedmonth + 1;
                          ePaymentDate.setText("" + selectedday + "/" + selectedmonth + "/" + selectedyear);
                      }
                  }, mYear, mMonth, mDay);
                  mDatePicker.setTitle("Select date");
                  mDatePicker.show();
              }
          });
  
  
      }
  
  
  
  
  
      private void initializeVariables()
      {
          Title = (TextView) findViewById(R.id.tvTitle);
          Amount = (TextView) findViewById(R.id.tvAmount);
          PaymentDate = (TextView) findViewById(R.id.tvPaymentDate);
          ReminderDate = (TextView) findViewById(R.id.tvReminderDate);
          ReminderTime = (TextView) findViewById(R.id.tvReminderTime);
          eTitle = (EditText) findViewById(R.id.etTitle);
          eAmount = (EditText) findViewById(R.id.etAmount);
          ePaymentDate = (EditText) findViewById(R.id.etPaymentDate);
          eReminderDate = (EditText) findViewById(R.id.etReminderDate);
          eReminderTime = (EditText) findViewById(R.id.etReminderTime);
      }
  
  
  }
  </code></pre>
  
  <p>This is what is currently displayed when I run my code and select the ePaymentDate field.</p>
  
  <p><img src="https://i.stack.imgur.com/FYmbp.png" alt="enter image description here"></p>