Dans Android, Tout en utilisant la fenêtre Popupcomportement de la fenêtre Popup Android
Si je setBackgroundDrawable
propriété de fenêtre pop-up Puis:
// Back button cannot override
// Outside touch working
Si je n'utilise pas setBackgroundBrawable
propriété de fenêtre pop-up Puis:
// Back button can override
// Outside touch is not working
Que dois-je faire si je veux les deux événements en même temps?
Merci d'avance.
pouvez-vous poster votre code? – FoamyGuy
Salut, Voici mon morceau de code if (mBackground == null) \t mWindow.setBackgroundDrawable (nouveau BitmapDrawable (mContext.getResources())); else \t mWindow.setBackgroundDrawable (mBackground); mWindow.setWidth (WindowManager.LayoutParams.MATCH_PARENT); mWindow.setHeight (WindowManager.LayoutParams.WRAP_CONTENT); mWindow.setTouchable (true); mWindow.setFocusable (true); mWindow.setOutsideTouchable (true); mWindow.setContentView (mRootView); mWindow.getContentView(). SetFocusableInTouchMode (true); –
à l'avenir s'il vous plaît modifier votre question lorsque vous souhaitez ajouter du code. Ne le mettez pas dans les engagements. – FoamyGuy