I have a problem with my Dialog Fragment. I wanted to use android:onClick attribute as in my opinion code is more clear then.
In my layout I have the following declarati
Try:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView (inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.dialog_new_database, container);
getDialog().setTitle("Hello");
return view;
private void buttonCancel (View view) {
dismiss();
}
private void buttonOK (View view) {
}
}