我正在執行maswebview類,我只想完成此活動。我嘗試maswebview.this.finish()
,但執行時,應用程序已關閉。然後,如果我爲標籤內容設置了新視圖,它會正確加載並且webviewmas消失,但僅僅一段時間,然後再次出現適合全屏。如何完成maswebview?謝謝你安卓完成當前活動導致應用關閉
public void onClick(View arg0)
{
/*
Intent intent = getIntent();
intent.addFlags(Intent.FLAG_ACTIVITY_TASK_ON_HOME);
startActivityForResult(intent, 1);
Intent intentmas = new Intent (maswebview.this, mas.class);
intentmas.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentmas.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intentmas.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intentmas.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
View vista = getLocalActivityManager().startActivity("maswb", intentmas).getDecorView();
setContentView(vista); */
maswebview.this.finish();
添加你的異常的完整堆棧跟蹤 – Houcine
你必須在這裏添加更多相關的代碼,這還不夠說什麼。 – Sajmon
是的,對不起,請參閱修改。在logcat上沒有例外,應用程序剛剛關閉而沒有錯誤 – Jaume