Manuel_Rodrigues
Manuel_Rodrigues

Reputation: 560

create triangular effect on view in titanium

How can I create this triangular effect on a view and the effect on the scrollview like the image describes?

I know how to create the scroll and populate it and how to create my view bot don't know how to create this effect in titanium javascript.

enter image description here

Upvotes: 0

Views: 64

Answers (1)

Said CHAOUCHE
Said CHAOUCHE

Reputation: 695

enter image description here

Imagine the view we want to hide with triangular effect is the green view,

so create a view yellow with rotation = 15° parent of green View, set to the green view a rotation = -15°,left = 0 and fix dimension width, height

inset the yellow view in your window with top = -Y, left = -X, calculate the X,Y to center the green view in screen

now you can have the triangular effect on changing the width of the yellow view

Upvotes: 1

Related Questions