0

Is there a way to implement a scroll view with sticky header and footer on a modal page. Something like this Sticky Header/Footer with ScrollView in between

This is what I have already in place but the GridLayout containing the social buttons is getting truncated.

<Page xmlns="http://schemas.nativescript.org/tns.xsd" shownModally="onShownModally" class="test">
  <StackLayout orietation= "veritcal" class="mainstack">
    <GridLayout rows="auto" columns="*, auto">
      <label text="{{title}}" textWrap="true" class="size16b align-center" col="0" row="0" />
      <Button text="&#xE5CD;" horizontalAlignment="right" tap="closePage" class="btn" col="1" row ="0"/>
    </GridLayout>
    <ScrollView>
      <ios><HtmlView class="stack" html="{{htmlString}}" /></ios>
      <android><WebView class="stack" src="{{htmlString}}" id="andWebView"/> </android>
    </ScrollView>
    <GridLayout rows="auto" columns="*, *, *, *" class="gridLay">
        <Button text="&#xf099;" horizontalAlignment="center" tap="closePage" class="socialbtn" col="0"/>
        <Button text="&#xf230;" horizontalAlignment="center" tap="closePage" class="socialbtn" col="1"/>
        <Button text="&#xf16d;" horizontalAlignment="center" tap="closePage" class="socialbtn" col="2"/>
        <Button text="&#xf166;" horizontalAlignment="center" tap="closePage" class="socialbtn" col="3"/>
    </GridLayout>
  </StackLayout>
</Page>

This what the result is: Truncated Social Icons

And this is what I am getting if I move the GridLayout before the Html/WebView and have doodled what I am hoping to get: Hoping to get something with social icon at the bottom

Community
  • 1
  • 1
ssiddh
  • 480
  • 1
  • 6
  • 18

1 Answers1

5

Try replacing the outer stacklayout with a gridlayout.

If you give the header and footer fixed height and the scrollview * it should work.

mabs
  • 987
  • 1
  • 10
  • 17
  • 2
    @ssiddh If the above answer has helped you and is correct, you might want to tick it as the approved answer. It will help others with the same problem as yours. – nbo Mar 30 '17 at 14:30