When creating a custom DialogFragment, i set the title using the following:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_dialog_add, container, false);
// Setting title here
getDialog().setTitle("Add New");
return v;
}
The above code works fine for me on API level older than 23. For API 23 the title is not showing at all.
Any idea why? and how to make the title show on API 23?