Sticky Footer in Alloy

352 Views Asked by At

Is there such as a sticky footer table in Alloy?

I'm trying to do something Like instagrams sticky header view but I want the footer to be the sticky part?

any ideas how to achieve this?

Since some people didn't understand the question

What I meant is does titanium support zindex on scrollable views? I have 3 views A,B,C and I want to scroll B over A(keep bottom of A visible) and then C over B(keep bottom of C visible)?

Thanksenter image description here

2

There are 2 best solutions below

5
On

sure. You just create a view with bootom:0 and a height. That will stick to the bottom. All your other elements go into a scrollable view that lays below the footer view. E.g.

index.xml

<ScrollView id="content"/>
<View id="bottom"/>

index.tss

"#content":{top:0,bottom:40,left:0,right:0,backgroundColor:"yellow"}
"#bottom":{bottom:0,height:40,left:0,right:0,backgroundColor:"blue"}
1
On
<View class="container" >
  <View class="mainView"/>
  <View class="bottomView"/>
</View>

//tss is

".container":{}
".mainView":{width:Ti.UI.FILL, height: Ti.UI.FILL, bottom:50dp}
".bottomView":{bottom:0,height:50dp}

Make sure you have Added bottom:50 to mainView.