Android-AlertDialog与此和getApplicationContext()

时间:2015-08-02 13:36:13

标签: android this android-alertdialog android-context

为什么AlertDialog使用标记“this”但不使用标记“getApplicationContext()”

AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); //work
AlertDialog.Builder alertDialog = new AlertDialog.Builder(getApplicationContext()); //doesn't Work

为什么会这样?

0 个答案:

没有答案