TableSection Spacing Android

Hi
I have 1 TableView, 3 TableSections.
In iOS , the TableSections have a space between them, this space is not replicated in Android, how would I add the space in Android? without upsetting the iOS layout.

My Ideas:

  1. Add a blank, disabled Cell which only shows on Android.
  2. Use a grid, which only shows on Android
  3. Platform Specific XAML forms, if == Android, use XAML-A if ==iOS use XAML-B
  4. Custom renderer. If so, How?

I am open to other ideas or if someone could tell me the recommended way or, which of my ideas to pursue it would be much appreciated.

Answers

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    I create a simple layout about TableSections

    <TableView Intent="Data" 
                   HasUnevenRows="true" >
                <TableRoot>
                    <TableSection Title="First Section 1 ">
                        <ViewCell>
                            <Label Text="TextCell 1" />
                        </ViewCell>
                    </TableSection>
                    <TableSection Title="Second Section 2">
                        <ViewCell>
                            <Label Text="TextCell 2" />
                        </ViewCell>
                    </TableSection>
                    <TableSection Title="Third Section 3">
                        <ViewCell>
                            <Label Text="TextCell 3" />
                        </ViewCell>
                    </TableSection>
                </TableRoot>
            </TableView>
    

    And here is the result on Android and iOS, I am a little confused about "space between TableSections, could you please elaborate a bit more about this? If you could post your code and some screen shot will be much appreciated!

Sign In or Register to comment.