title: How to show only year in spinner
body: <p>Creating app in which i want to show only year in spinner.I am using DatepickerDialog which is showing date,month and year but i want to show only year.</p>
  
  <pre><code>datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
  
              @Override
              public void onDateSet(DatePicker datePicker, int selectedYear, int selectedMonth, int selectedDate) {
  
                  datePicker = (DatePicker) findViewById(R.id.datePicker);
                  // datePicker.getYear();
                  // year = selectedYear;
                  tvYearSelection.setText(new StringBuilder().append(datePicker.getYear()));
              }
          }, year, 0, 0);
  
          datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis());
          datePickerDialog.show();
  </code></pre>