title: How to show native Islamic(hijri) Calendar?
body: <p>I want to show the date picker Dialog on Android. Now I can choose only Normal Date. How I can convert it to hijri(islamic) Calendar? Here is the code I am using to show the Dialog,</p>
  
  <p>Code to Show Date-picker Dialog</p>
  
  <pre><code>private void showDOBPickerDialog(Context context, String DateString) {
      try {
          String defaltDate = getCurrentDate_MMDDYYYY();
          if (DateString == null || DateString.isEmpty() || DateString.length() &lt; 10)
              DateString = defaltDate;
  
          int monthOfYear, dayOfMonth, year;
          monthOfYear = Integer.parseInt(DateString.substring(0, DateString.indexOf("/"))) - 1;
          dayOfMonth = Integer.parseInt(DateString.substring(DateString.indexOf("/") + 1, DateString.lastIndexOf("/")));
          year = Integer.parseInt(DateString.substring(DateString.lastIndexOf("/") + 1));
  
          DatePickerDialog datePickerDialog = new DatePickerDialog(context, new DatePickerDialog.OnDateSetListener() {
              @Override
              public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
                  monthOfYear = monthOfYear + 1;
                  String Month = String.valueOf(monthOfYear), Day = String.valueOf(dayOfMonth);
                  if (monthOfYear &lt; 10)
                      Month = "0" + monthOfYear;
  
                  if (dayOfMonth &lt; 10)
                      Day = "0" + dayOfMonth;
                  String selectedDate = Month + "/" + Day + "/" + year;
                  edtTxtDateOfId.setText(selectedDate);
              }
          }, year, monthOfYear, dayOfMonth);
          datePickerDialog.setTitle("Select Date");
          datePickerDialog.show();
      } catch (Exception e) {
      }
  }
  </code></pre>
  
  <p>To get the Current Date,</p>
  
  <pre><code>public static String getCurrentDate_MMDDYYYY() {
      String DATE_FORMAT_NOW = "MM/dd/yyyy";
      SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
      Calendar cal = GregorianCalendar.getInstance(Locale.FRANCE);
      cal.setTime(new Date());
      return sdf.format(cal.getTime());
  }
  </code></pre>