Android アプリケーションに、必要な動作に従わないポップアップ ウィンドウがあります。ビューからアンカーとしてポップアップ ウィンドウを作成でき、ポップアップ領域の外に触れると閉じます。 しかし、ポップアップウィンドウを閉じるだけのこのクリックでは、アクションを実行できません。
ポップアップウィンドウを閉じて、同じクリックで別のビューをクリックできるようにしたいと思います。誰もこれを達成する方法を知っていますか??
ポップアップ ウィンドウのコードは次のとおりです。
//Get the instance of the LayoutInflater
LayoutInflater inflater = (LayoutInflater) Page_Activity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.popup,(ViewGroup) findViewById(R.id.popup_element));
//Initialize popup window size and attributes
popup_window = new PopupWindow(layout, 300, 210, true);
popup_window.setOutsideTouchable(true);
popup_window.setTouchable(true);
popup_window.setBackgroundDrawable(new BitmapDrawable());
//Show popup window
popup_window.showAsDropDown(anchor);