Ich habe ein PopupWindow und ich wollte es zu entlassen, wenn der Benutzer außerhalb berührt, also habe ich untersucht und herausgefunden, dass ich verwenden musste. Das Problem ist, dass der Konstruktor new BitmpaDrawable()
veraltet ist. Ich möchte eine Lösung finden, ohne sie zu benutzen.PopupWindow auf Touch außerhalb Popup, ohne veralteten Konstruktor zu verwerfen
Weiß jemand, wie man das löst?
Danke!
final PopupWindow popup = new PopupWindow(sortByView,
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT,
true);
popup.setBackgroundDrawable(new BitmapDrawable());
popup.setOutsideTouchable(true);
popup.showAsDropDown(v);
popup.setBackgroundDrawable (neu ColorDrawable (android.R.color.transparent)); – Petrus