Answer the question
In order to leave comments, you need to log in
How to remove buttons from dialog box?
I use the MaterialDateTimePicker library and there are two buttons Ok and Cancel in the window. That is, you choose a date and then you have to click on OK! So I need to remove these buttons and when choosing a date, I immediately went. I rummaged everywhere, but could not understand because everywhere it refers back and forth. I am new to this business and I have a mess in my head ... Please help me, where to dig, where to look?
Answer the question
In order to leave comments, you need to log in
Judging by the code, the authors do not provide for this. You can do this hack:
inherit your dialog from DatePickerDialog, override:
public View onCreateView(...) {
final View root = super.onCreateView(...);
root.findViewById(com.wdullaer.materialdatetimepicker.R.id.ok).setVisibility(View.GONE);
root.findViewById(com.wdullaer.materialdatetimepicker.R.id.cancel).setVisibility(View.GONE);
return root;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question