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

Quick Action location issue (ICS 4.0.3) #12

Open
daisho-wakazashi opened this issue Mar 16, 2012 · 3 comments
Open

Quick Action location issue (ICS 4.0.3) #12

daisho-wakazashi opened this issue Mar 16, 2012 · 3 comments

Comments

@daisho-wakazashi
Copy link

Hi,

I'm just running side-by-side fragments in an activity on my tablet (android.support.v4.app.ListFragment on right) with QuickAction called using onListItemClick(). However when this is done, the location of the QA is over the left fragment. Issue arise from QuickAction class mRootview width being a number in the millions (as opposed to the actual screenwidth being 1280)

Let me know if you need anything else.

@daisho-wakazashi
Copy link
Author

I think if you use the anchor view rather than the mRootView (with a width of 16777214!!) then the QA should be positioned above/below the list item that was pressed.

@xabaras
Copy link

xabaras commented Jun 15, 2012

Same issue on Galaxy S 2 ICS 4.0.3

@mauriziopinotti
Copy link

I've changed

mRootView.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

to

mRootView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY));

and

int xPos            = (screenWidth - rootWidth) / 2;

to

int xPos            = (screenWidth - rootWidth);

in

QuickAction.show()

Now it works fine 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

3 participants