0
使用過Android Studio解僱我有它加載在一個方法訪問popupWindow從不同空
...
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.orderup, null);
final PopupWindow popupWindow = new PopupWindow(popupView,LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
...
popupWindow.showAsDropDown(findViewById(R.id.posMain), 50, -1*(height-50));
一旦運行有多個按鈕,用戶會點擊把那個任務完成的彈出窗口。當完成時,我想關閉popupWindow。它如何使用popupWindow,即使它在一個不同的無效方法中使用。