How to hide/remove date field in datepickerdialog. Actually my requirement is to use the native date picker dialog but it shows up with day, month, and year. But as per my r
I don't recommend using Reflection to do this kind of thing.
There is a simpler and more pretty way to do so:
((ViewGroup) datePickerDialog.getDatePicker()).findViewById(Resources.getSystem().getIdentifier("day", "id", "android")).setVisibility(View.GONE);
Be aware that .getDatePicker() method from DatePickerDialog works on API LEVEL >= 11.