PDA

View Full Version : several views



Nemo76
6 Dec 2010, 9:36 AM
Hello,

i want to use sencha for my bachelor thesis und got some questions.

I want to have 2 simple views and i want to change between them with a flip effect like in jQTouch. How does this work?

Another point is, that i would like to have my page visible on smartphones and a usual Firefox on a Laptop. With jQTouch i just didn't see the flip effect and the buttons, but at least it worked. But the example Forms (http://dev.sencha.com/deploy/touch/examples/forms/) is not visible at my Firefox at all.

Thanks a lot for help,
Rene from germany

Fredric Berling
6 Dec 2010, 12:24 PM
You create a card layout, where each card (item in items) is your respective "view" .. You can then flip between them using:



YourCardLayoutPanel.setCard(1, {
type: 'flip'
})

and...

YourCardLayoutPanel.setCard(0, {
type: 'flip'
})


Code not tested

Firfox does not work well with ST

mrsunshine
6 Dec 2010, 2:04 PM
ST works with Webkit based browsers, so for your Desktop you have to use Safari or Chrom.

setCard() is obsolete use

youPanel.setActiveItem(0, 'flip')