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

Nested ExpandableView #8

Closed
RicardoMoraisPOR opened this issue Jan 17, 2019 · 8 comments
Closed

Nested ExpandableView #8

RicardoMoraisPOR opened this issue Jan 17, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@RicardoMoraisPOR
Copy link

RicardoMoraisPOR commented Jan 17, 2019

Is it possible to have an ExpandableView inside another ExpandableView? and if so how can i achive it?
Example Code:

XAML

<expandable:ExpandableView>
    <expandable:ExpandableView.PrimaryView>
        <StackLayout BackgroundColor="Black" HeightRequest="200">

        </StackLayout>
    </expandable:ExpandableView.PrimaryView>
    <expandable:ExpandableView.SecondaryViewTemplate>
        <DataTemplate>
            <expandable:ExpandableView>
                <expandable:ExpandableView.PrimaryView>
                    <StackLayout BackgroundColor="Green" HeightRequest="200">

                    </StackLayout>
                </expandable:ExpandableView.PrimaryView>
                <expandable:ExpandableView.SecondaryViewTemplate>
                    <DataTemplate>
                        <StackLayout BackgroundColor="Blue" HeightRequest="200">

                        </StackLayout>
                    </DataTemplate>
                </expandable:ExpandableView.SecondaryViewTemplate>
            </expandable:ExpandableView>
        </DataTemplate>
    </expandable:ExpandableView.SecondaryViewTemplate>
</expandable:ExpandableView>

I can only access the "green" StackLayout, the secondary data for that StackLayout doesn't open (the "blue" StackLayout), is this an expected behaviour?

EDIT: If i set IsExpanded=true in the inside ExpandableView, i can see that the animation happens, but not the expanding

@AndreiMisiukevich
Copy link
Owner

Hi @RicardoMoraisPOR Have you tried to set SecondaryViewHeightRequest of expandableView property ?

@AndreiMisiukevich AndreiMisiukevich added the question Further information is requested label Jan 17, 2019
@RicardoMoraisPOR
Copy link
Author

RicardoMoraisPOR commented Jan 17, 2019

@AndreiMisiukevich Yes and i think i just figure out what's happening, if i set SecondaryViewHeightRequest with 400 (each stack on my example as 200) i get something like this:


Primary (black)


Secondary (green)

//white space


that way it gives enough space so that when i click in the "green" StackLayout the blue StackLayout can be shown:


Primary (black)


Secondary (green)


Secondary(of secondary) (blue)


but that way it leaves me with a big white space in the first SecondaryView , any ideas how can i update the height while keeping the animation feeling?

@AndreiMisiukevich
Copy link
Owner

@RicardoMoraisPOR Good question =\ have no idea yet.

@AndreiMisiukevich AndreiMisiukevich added enhancement New feature or request help wanted Extra attention is needed and removed question Further information is requested labels Jan 17, 2019
@RicardoMoraisPOR
Copy link
Author

@AndreiMisiukevich i will keep trying to find an solution , thank you for your time

@AndreiMisiukevich AndreiMisiukevich changed the title ExpandableView Inside Another ExpandableView in the Secondary Data Template Nested ExpandableView Jan 18, 2019
@AndreiMisiukevich
Copy link
Owner

@RicardoMoraisPOR Hi, did you try?)

@RicardoMoraisPOR
Copy link
Author

@RicardoMoraisPOR Hi, did you try?)

I didn't find any workaround, since the project has a deadline, we dropped the idea for a nested expandable view, sorry.
This is a very niche problem, but i will comeback and try to solve this

@AndreiMisiukevich
Copy link
Owner

Closing for now. Maybe return later.
For now i am not keen to support nested expandable view.

@AndreiMisiukevich AndreiMisiukevich added wontfix This will not be worked on and removed help wanted Extra attention is needed labels Feb 18, 2019
@AndreiMisiukevich AndreiMisiukevich removed the wontfix This will not be worked on label Jun 6, 2019
@AndreiMisiukevich
Copy link
Owner

#19

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

No branches or pull requests

2 participants