我创建了一个对话框,但根据活动工作流程它应该触发 onpause 但它没有。出了什么问题?Android 活动流程:http: //developer.android.com/training/basics/activity-lifecycle/pausing.html
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
//stopAutoCall = true;
// Handle item selection
// if (item.getTitle().toString().toLowerCase() == "settings")
// {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Number");
alert.setMessage("Put here the number in to call");
alert.show();
}
@Override
public void onPause()
{
super.onPause();
stopAutoCall = true;
}