Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

click on ActionItem sometimes cause popup window transparent #3

Open
kojilin opened this issue Nov 18, 2011 · 6 comments
Open

click on ActionItem sometimes cause popup window transparent #3

kojilin opened this issue Nov 18, 2011 · 6 comments

Comments

@kojilin
Copy link

kojilin commented Nov 18, 2011

when ActionItem has onclick effect like action_item_btn.xml and quickAction dismissed,
it sometimes cause popupwindow has transparent rectangle.

like below:
https://docs.google.com/leaf?id=0BwrpgpmcQWZXMTI0NzExZWUtMmNlMS00MzBhLWEzODAtYTgwZDk3N2NlYTVl&hl=zh_TW

@xhandros
Copy link

I´ve the same problem, I appreciate any help.

@eo
Copy link

eo commented Feb 2, 2012

I also have the exact same problem.

@xhandros
Copy link

xhandros commented Feb 2, 2012

I think that is a cyanogen problem (in my case) because this behavior is the same in the system app's popupwindow

@pacificsky
Copy link

The problem is this line in PopupWindows.java:
mWindow.setBackgroundDrawable(new BitmapDrawable());

Remove the if/else clause completely and change it to:
mWindow.setBackgroundDrawable(mBackground);

It's OK to set a null background on PopupWindow. And it fixes this issue :-)

@coup
Copy link

coup commented Aug 13, 2012

if you will remove mWindow.setBackgroundDrawable(new BitmapDrawable()); then once the QuickAction gets open and if you try to click on some other part of the screen then it will not get closed automatically.

so mWindow.setBackgroundDrawable(null); wont be the solution

@khaykov
Copy link

khaykov commented Oct 16, 2012

sunloverz wrote solution (if you can call it like this) in NewQuickAction project discussions. It works with NewQuickAction3D.
Just change dismiss() method in PopupWindows.java to something like this:

public void dismiss() {
        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                // Will be called after 1 ms
                mWindow.dismiss();
            }
        }, 1);
    }

Works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants