完成反编译代码

时间:2012-03-15 22:50:29

标签: java android alertdialog bytecode decompiler

我有以下代码部分。应该用什么方法代替当地的36?

   public void Alert()
  {
    AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
    AlertDialog.Builder localBuilder2 = localBuilder1.setMessage("You lost").setCancelable(false);
    36 local36 = new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        paramDialogInterface.cancel();
        Pokemon.this.setContentView(2130903046);
        Pokemon.this.mainmenu();
      }
    };
    AlertDialog.Builder localBuilder3 = localBuilder2.setPositiveButton("OK", local36);
    AlertDialog localAlertDialog = localBuilder1.create();
    this.alert = localAlertDialog;
    this.alert.show();
  }

1 个答案:

答案 0 :(得分:4)

我希望原始代码看起来像这样:

AlertDialog.Builder localBuilder3 =
  localBuilder2.setPositiveButton
  (
    "OK",
    new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        paramDialogInterface.cancel();
        Pokemon.this.setContentView(2130903046);
        Pokemon.this.mainmenu();
      }
    }
  );

而不是有两个单独的陈述。所以36不在原始代码中;它代表匿名内部类的名称。