I've been trying to code with SmartFace. I need to make an image slider. But, I am stuck and don't know where to start. I want to make something like this : https://www.google.com.tr/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwj9tIH0hcjKAhWM7hoKHQ4dCIMQjRwIBw&url=http%3A%2F%2Fjquery-plugins.net%2Ftag%2Ftouch-enabled-slider&psig=AFQjCNH_vEXXcHB4fajB7f1Pz9x2kmwU7g&ust=1453917230609303
Asked
Active
Viewed 70 times
1 Answers
1
You can make image slider by using scrollview. This document help you to create it. Also you can see an image slider example if you download 'Smartface In Action' in App Store.
Here is the sample code:
var imageSlider = new SMF.UI.ScrollView({
top : "10%",
left : "10%",
width : "80%",
height : "60%",
contentHeight : "200%",
contentWidth : "100%",
autoSize : true,
layoutType : SMF.UI.LayoutType.linear,
orientation : SMF.UI.Orientation.horizontal,
enableHorizontalPaging : true,
enableHorizontalScrolling : true,
horizontalGap : "0dp",
verticalGap : "0dp",
});
Pages.Page1.add(imageSlider);
function fillScrollView() {
for (var i = 1; i <= 10; i++) {
var image = new SMF.UI.Image({
width : "80%",
height : "30%",
top : "5%",
left : "5%",
image : "myimage.png",
multipleLine : false
});
imageSlider .add(image);
}
}
fillScrollView();

Ed Glazer
- 121
- 3