我有它的工作,但现在不是。 logcat中没有关于它的内容。
style.xml
@style/DialogAnimation
@anim/push_right_in
@anim/push_right_out
Java的
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Are you sure you want to exit??? Your progress will be saved.")
.setCancelable(false)
.setPositiveButton("No", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int id)
{
}
})
.setNegativeButton("Yes", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int id)
{
dialog.cancel();
finish();
}
});
AlertDialog alert = builder.create();
alert.hide();
alert.getWindow().getAttributes().windowAnimations = R.style.DialogSlideAnim;
alert.show();有没有人看到这个代码有什么问题?在我做额外的编码之前,一切都在工作......而且我的活动中有大约12个警报箱。