Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. <Alloy>
  2. <Collection id="galleryCollection" src="Gallery" instance="true" />
  3. <ListView defaultItemTemplate="gallery-template">
  4. <Templates>
  5. <ItemTemplate name="gallery-template" backgroundColor="transparent">
  6. <View bindId="row" class="gallery-row">
  7. <View bindId="itemEven" class="gallery-item" onClick="onOpenGallery">
  8. <ImageView class="gallery-image" bindId="imageEven" />
  9. <View class="gallery-info">
  10. <Label bindId="titleEven" class="gallery-title" />
  11. <Label bindId="dateEven" class="gallery-date" />
  12. <Label bindId="countEven" class="gallery-count" />
  13. <ImageView class="gallery-count-icon" image="images/ic_photo_camera_white_18dp.png" />
  14. </View>
  15. </View>
  16. <View bindId="itemOdd" class="gallery-item--odd" onClick="onOpenGallery">
  17. <ImageView bindId="imageOdd" />
  18. <View class="gallery-info">
  19. <Label bindId="titleOdd" class="gallery-title" />
  20. <Label bindId="dateOdd" class="gallery-date" />
  21. <Label bindId="countOdd" class="gallery-count" />
  22. <ImageView class="gallery-count-icon" image="images/ic_photo_camera_white_18dp.png" />
  23. </View>
  24. </View>
  25. </View>
  26. </ItemTemplate>
  27. </Templates>
  28. <ListSection dataCollection="$.galleryCollection">
  29. <ListItem
  30. template="{template}"
  31. row:height="{itemHeight}"
  32.  
  33. itemEven:galleryId="{itemEven.galleryId}"
  34. itemEven:width="{itemWidth}"
  35. itemEven:height="{itemHeight}"
  36. imageEven:image="{itemEven.titlePhotoThumbnailUrl}"
  37. imageEven:width="{itemWidth}"
  38. titleEven:text="{itemEven.title}"
  39. titleEven:width="{itemWidth}"
  40. dateEven:text="{itemEven.formattedDate}"
  41. countEven:text="{itemEven.imageCount}"
  42.  
  43. itemOdd:galleryId="{itemOdd.galleryId}"
  44. itemOdd:width="{itemWidth}"
  45. itemOdd:height="{itemHeight}"
  46. imageOdd:image="{itemOdd.titlePhotoThumbnailUrl}"
  47. imageOdd:width="{itemWidth}"
  48. titleOdd:text="{itemOdd.title}"
  49. dateOdd:text="{itemOdd.formattedDate}"
  50. countOdd:text="{itemOdd.imageCount}"
  51. itemOdd:visible="{itemOdd.visible}" />
  52. </ListSection>
  53. </ListView>
  54. </Alloy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement