Note that there are some explanatory texts on larger screens.

plurals
  1. POA button in a PopupWindow goes transparent when clicked quickly?
    text
    copied!<p>I have a PopupWindow that has tow buttons inside of it. They work as expected and when pressed and held down goes to pressed state and than performs the action. The issue comes when I just quickly press the button and let up. This causes the button to become transparent as well as the background on the PopupWindow. This only happens when the user clicks and does not hold it down. Any ideas what might be causing this?</p> <p>Code to show Popup:</p> <pre><code> final String path = argpath; LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.productpopup, null, false); ImageView iv = (ImageView) layout.findViewById(R.id.big_product_image); TextView tv = (TextView)layout.findViewById(R.id.productDescription); if (fullDescription.equals("")) tv.setVisibility(View.GONE); else tv.setText(fullDescription); if (iv != null &amp;&amp; imageID != ImageManager.NOIMAGE) { iv.setImageResource(imageID); popup = new PopupWindow(layout, LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, true); BitmapDrawable bm = new BitmapDrawable(); popup.setBackgroundDrawable(bm); popup.setOutsideTouchable(true); popup.setAnimationStyle(android.R.style.Animation_Toast); popup.showAtLocation(getWindow().getDecorView(), Gravity.CENTER, 0, 0); Button closeButton = (Button) layout.findViewById(R.id.close); Button orderButton = (Button) layout.findViewById(R.id.order); closeButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { popup.dismiss(); } }); if (!path.equals("")) { orderButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (path != null) startActivity(routeTo(path)); popup.dismiss(); } }); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload