Problems with IElementSizing in Monotouch.Dialog included into MvvmCross #182

Closed
asednev opened this Issue Mar 6, 2013 · 12 comments

Projects

None yet

4 participants

@asednev
Contributor
asednev commented Mar 6, 2013

All elements are always sized the same and IElementSizing is ignored. Even MessageElement that comes as a part of MT.D isn't sized properly.

@slodge
Contributor
slodge commented Mar 6, 2013

I know people have done custom sized elements:
#142

If you've got a problem, then you're going to need to supply way more detail than 1 line - a full reproduction test case would help.

@SeeD-Seifer
Contributor

Have you tried set Root.UnevenRows=true?

@asednev
Contributor
asednev commented Mar 6, 2013

Yes, I have UnevenRows set to true. I'll try to build a stand-alone reproduction. For now, I can only show a screen shot of a dialog with MessageElement and MultilineEntryElements added. You can clearly see that the height of both rows is incorrect. Since other people managed to build controls of variable height, I would appreciate any clues. I may well miss something.

iOS Simulator Screen shot Mar 6 2013 11 22 30 AM

@slodge
Contributor
slodge commented Mar 11, 2013

Is there any more on this? Simple code to repro? Or have you already solved whatever it was?

@asednev
Contributor
asednev commented Mar 12, 2013

Yes, I finally have a very simple project that reproduces the issue: https://github.com/asednev/MvvmCrossIssue

@SeeD-Seifer
Contributor

Hi, asednev.

Try to replace this code in MyViewController.cs (starts from line 24)

            Root = new RootElement("Test")
            {
                sec
            };
            Root.UnevenRows = true;

with this

            var root = new RootElement("Test")
            {
                sec
            };
            root.UnevenRows = true;
            Root = root;
@asednev
Contributor
asednev commented Mar 12, 2013

This fixed it. Thank you SeeD-Seifer.

@asednev asednev closed this Mar 12, 2013
@slodge
Contributor
slodge commented Mar 12, 2013

Thanks guys

Looking through the Dialog code this seems to come from the MT.D version I forked.

It looks like the sizing info is only used from within ReloadData() so maybe this is down to CrossUI.Touch never calling that method.

Will have a closer look later.

Thanks all - for the issue, the sample and the workaround/fix.

@asednev
Contributor
asednev commented Mar 12, 2013

Stuart, when I did my research on this issue, I came across several bug reports about sizing info not working in MT.D. It might well be possible that it was fixed after you forked it.

@slodge
Contributor
slodge commented Mar 15, 2013

Going to reopen this one up.

would be nice to be able to reload the cell later in it's life

need to find some way to call

        reloadRowsAtIndexPaths

at some point (maybe on UI change)

@slodge slodge reopened this Mar 15, 2013
@slodge
Contributor
slodge commented Mar 15, 2013

For a sample of the current problem, consider the current Details page on CustomerManagement (normal - not AutoViews)

@kjeremy
Contributor
kjeremy commented Dec 12, 2016

CrossUI/Dialog has been removed as of 41f1915

@kjeremy kjeremy closed this Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment