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

How can I know which item is selected in popover view #10

Open
skywalkerlw opened this issue Nov 13, 2014 · 1 comment
Open

How can I know which item is selected in popover view #10

skywalkerlw opened this issue Nov 13, 2014 · 1 comment

Comments

@skywalkerlw
Copy link

if the popover view is a list view, how can I know which one is selected in delegate?

@lupidan
Copy link
Owner

lupidan commented Nov 13, 2014

Detecting events (like selection) from the ListView should depend on that ListView's listeners, not the PopoverView.

However, if you need to access the enclosed view from the delegate, right now, the reference of the view you enclose in the popover view is not easily accessible.
If you need to retrieve it easily, I'd suggest to add a public member in the PopoverView class

public View enclosedView;

And add this line in the method initPopoverView, at line 308 for example

this.enclosedView = enclosedView;

By doing this, you can now retrieve the view that you enclosed in the PopoverView, therefore, you can retrieve your ListView to get the selected view.

ListView listView = (ListView)myPopoverView.enclosedView;

Did this information help you?

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

2 participants