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

Popup Viewer does not scroll when height exceeds parent layout #318

Open
keithpower opened this issue Mar 5, 2020 · 3 comments
Open

Popup Viewer does not scroll when height exceeds parent layout #318

keithpower opened this issue Mar 5, 2020 · 3 comments

Comments

@keithpower
Copy link

Xamarin Forms 4.3, Android

This can be reproduced in the sample app if you use a feature layer with a lot of fields. The popup viewer will take up the whole height and any fields that don't fit are cut off and you cannot scroll.

You can also reproduce with the sample app if you put the PopupViewer in a grid that has a smaller height than the number of fields in the Ambulance feature layer.

I tried different settings on the parent layout (VerticalOptions) and tried recreating the PopupViewer each time and from code, adding it as a child to the layout.

What I want is a PopupViewer in a Frame that is about 80% of the height of the Android tablet. But my feature layers have a lot of fields so it is cutting them off since it will not scroll.

@dotMorten
Copy link
Member

I believe this is by design, and you should use a scroll viewer around it.

@keithpower
Copy link
Author

Thanks Morten. I had tried that originally and had troubles. The problem is the scrollviewer needs to know the size of the PopupViewer. Each time I set the PopupManager field to a new value, the PopupViewer refreshes internally but its Height is still exposed as -1. The result is the scrollviewer does not scroll. My hack right now is to set the PopupViewer HeightRequest explicitly each time based on (numberOfFields * 42). Not ideal, there will be problems with this.

I think the PopupViewer would need to update its height each time the PopupManager is set for this to work.

Also, somewhat unrelated, how do you edit fields in the PopupViewer? AllowEdit on the PopupManager is true but not sure how to set it to edit mode.

@dotMorten
Copy link
Member

Thank you for the description. Any chance you have a reproducer demonstrating the problem?

Wrt editing, the PopupViewer is exactly that: A viewer. It does not at this point allow editing.

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