You need to use a Theme.AppCompat theme (or descendant) with this activity

replace
new android.support.v7.app.AlertDialog.Builder(getApplicationContext())

to:
new android.support.v7.app.AlertDialog.Builder(this)