标签:技术 context settings strong lin nbsp cas line 返回
本文地址: http://blog.csdn.net/caroline_wendy
DialogFragment mLocationDialog = new AlertDialogFragment().setTitle("启动位置服务")
.setMessage("为了您能更好地使用本功能。请开启定位服务,否则无法使用此功能。")
.setButtons("返回", "设置")
.setOnButtonClickListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
switch (i) {
case 0: //"取消"button直接退出
getActivity().finish();
return;
case 1: //"设置"button设置GPS
LocationServiceUtils.gotoLocServiceSettings(getAppContext());
return;
default:
return;
}
}
});
标签:技术 context settings strong lin nbsp cas line 返回
原文地址:http://www.cnblogs.com/lytwajue/p/6789355.html