Это большой провал:
final AlertDialog.Builder resetQuestion = null;
resetQuestion.setTitle("Reset?");
Вы пытаетесь использовать нулевой объект, и это (конечно) выдаст NullPointerException
Вот как я создаю диалоги (и я думаю, что это лучший способ сделать это):
LayoutInflater factory = LayoutInflater.from(this);
final View textEntryView = factory.inflate(R.layout.dialogo_layout, null);
final AlertDialog.Builder resetQuestion = new AlertDialog.Builder(YourActivity.this)
// do whatever you want with the resetQuestion AlertDialog
Здесь R.layout.dialogo_layout
представляет файл с именем dialogo_layout.xml
в каталоге res/layout
, который содержит макет диалога.