私は以下のように作成popupwindow
しています、
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
LinearLayout linearLayout = new LinearLayout(TimerGameActivity.this);
TextView textView = new TextView(TimerGameActivity.this);
textView.setText("Quit? Score will be lost....");
linearLayout.addView(textView);
PopupWindow popupWindow = new PopupWindow(linearLayout, 200, 100,true);
popupWindow.showAtLocation(linearLayout, Gravity.BOTTOM, 10, 10)
}
しかし、私は以下のような問題に直面しています。戻るボタンを押すと、ポップアップウィンドウが表示されず、アクティビティが破棄されます。次のエラーが発生します。
04-18 15:04:55.457: E/WindowManager(590): Activity has leaked window android.widget.LinearLayout@44f88be8 that was originally added here
手伝ってください。ありがとう