Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

How to hide a - or alternative for form layout?

$
0
0

Ok, this is (or ought to be) straightforward - unless I am overlooking something (which probably is the case).

I have created a very simple example:

index.xml

<Alloy>
        <Window>
            <TableView>
                <TableViewSection>
                    <TableViewRow>
                        <Label>Row 1</Label>
                    </TableViewRow>
                    <TableViewRow visible="false">
                        <Label>Row 2</Label>
                    </TableViewRow>
                    <TableViewRow id="row3">
                        <Label>Row 3</Label>
                    </TableViewRow>
                </TableViewSection>
            </TableView>
        </Window>
    </Alloy>
... and index.tss:
"#row3":{visible:false}
 
    "Window": {
        top: 60
    }
I would have expected that row 2 and row 3 were NOT displayed. However, all rows display (in the iOS Simulator).

I have read about similar issues in earlier versions of Titanium Studio. The workaround from these 2-4 years old posts were to set the height of the tableviewrow to 1 (as 0 is ignored). However, this still shows part of the label. Then I can hide the label (visible="false" workst for that!) and then I only see a "thin" row. But with the standard view row separators you still see that there is a row....

So, what am I doing wrong here??

I use the TableView layout to create a form for entering data - and some of the rows should only be shown to the user if a switch is set. Is there a better pattern for doing this?

I am on Studio 3.4.1GA, Mac OS X 10.10.1 and using the 8.1 iOS in simulator ;-)

Thank you in advance!

/John


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>