1 .理解 setPositiveButton 、setNegativeButton、setNeutralButton函数都可以用来定义按钮,各按钮分别默认代表正面、中立、反面的结果。
要使用“DialogInterface”函数,需要先导入必须的函数库:
import android.content.DialogInterface;
2.demo如下
1 .理解 setPositiveButton 、setNegativeButton、setNeutralButton函数都可以用来定义按钮,各按钮分别默认代表正面、中立、反面的结果。
要使用“DialogInterface”函数,需要先导入必须的函数库:
import android.content.DialogInterface;
2.demo如下