0

I need to remove the date in top line, see the image (it marker in yellow):

Date Picker

and this is my code:

final Calendar mCalender = Calendar.getInstance();
int mYear = mCalender.get(Calendar.YEAR);
int mMonth = mCalender.get(Calendar.MONTH);
int mDay = mCalender.get(Calendar.DAY_OF_MONTH);

DatePickerDialog dialog = new DatePickerDialog(getActivity(),R.style.DatePicker,
          (DatePickerDialog.OnDateSetListener) getActivity(), mYear, mMonth, mDay);

and this the code from layout xml:

<EditText
    android:id="@+id/editDate"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:focusable="false"
    android:hint="Date"
    android:onClick="getDate"
    android:textCursorDrawable="@color/colorPrimaryDark"/>

what I should do for fix it?

alot of thanks :)

Milo
  • 3,365
  • 9
  • 30
  • 44
David
  • 9
  • 6

1 Answers1

0

It is just a dialog title where date is visible on top which you don't want to show. Try this line of code to set title as empty :

  dialog.setTitle("");

Hope this works.

Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65