You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by chris_d_k <ck...@christiankiefer.de> on 2015/02/19 15:03:22 UTC
What is the best way to have on demand scrolling in flex mobile
views?
I want to add scrollbars to views only if this is necessary (need them on
iPhone 4 but not on 5 or higher).
What is the best and most performant way to achive this? My Views actually
have no skin.
What I did is to check in updateDisplayList if the content fits and if not:
scroller = new Scroller();
scroller.width = width;
scroller.height = height;
scrollingContainer = new Group();
scrollingContainer.layout = new VerticalLayout();
scrollingContainer.setStyle("horizontalAlign", "center");
scrollingContainer.setStyle("gap", GAP_SIZE);
scrollingContainer.setStyle("paddingTop", GAP_SIZE * 2);
scrollingContainer.addElement(component1);
scrollingContainer.addElement(component2);
scrollingContainer.addElement(component3);
...
addElement(scrollingContainer);
scroller.viewport = scrollingContainer;
addElement(scroller);
Is there a better way?
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/What-is-the-best-way-to-have-on-demand-scrolling-in-flex-mobile-views-tp9638.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.