AlertDialog.Builder adb = new AlertDialog.Builder(this, R.style.dialog);
构造方法AlertDialog.Builder(MoreActivity,int);未定义?查了一下官方文档:
AlertDialog.Builder(Context context, int theme)
Constructor using a context and theme for this builder and the AlertDialog it creates.又已知,Activity继承Context,那我传this,为什么不可以?
构造方法AlertDialog.Builder(MoreActivity,int);未定义?查了一下官方文档:
AlertDialog.Builder(Context context, int theme)
Constructor using a context and theme for this builder and the AlertDialog it creates.又已知,Activity继承Context,那我传this,为什么不可以?
AlertDialog的所有构造函数都是写保护的,不能通过构造函数来直接创建。
一般用Builder
AlertDialog.Builder(Context context)这个可以呀,那个为什么不行呢?
这个构造方法是4.0之后才有的,
以前都是new AlertDialog.Builder(Context context);