ptamzz
ptamzz

Reputation: 9355

How to create layout in Titanium

enter image description here

How do I create a layout as in the image above in titanium?

When someone scrolls, I want the left and the right column to stay fixed to the screen (as in CSS fixed position) while only the middle column scrolls.

When someone taps on a button on either the left column or the right column, the buttons in the middle column are going to be replaced with new buttons.

Upvotes: 0

Views: 608

Answers (2)

Ammar
Ammar

Reputation: 1821

First of all, set current window's layout to 'horizontal'.

Then create left view(Ti.UI.View), mid view(Ti.UI.ScrollView) and right view(Ti.UI.View).

Set the layout of all of these three view to 'vertical'.

Now when you would scroll, left and right view will remain at same state while just mid view will be scrolled.

Hope it would solve your problem.

Upvotes: 1

Aaron Saunders
Aaron Saunders

Reputation: 33335

.1 Create the base view that contains the left and right buttons.

.2 on top of that view, create a scrollable view transparent, with the learning, eating buttons on it.

// SCROLLER
var scroller = Titanium.UI.createScrollableView({
    pagingControlColor:'transparent',
});

Upvotes: 1

Related Questions