Guest User

Untitled

a guest
Oct 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. if bz.os is 'android'
  2. bz.ui.navBar = (args) => # raname NavBar
  3. {windowObject, backgroundURL, leftButtonObject, rightButtonObject, logoImageURL, options} = args
  4. header = Titanium.UI.createView
  5. backgroundImage: backgroundURL
  6. height: '44dp'
  7. top: 0, left:0, right:0
  8.  
  9. if logoImageURL?
  10. logoImage = Ti.UI.createImageView
  11. image: logoImageURL
  12. height:'44dp', width:'160dp'
  13. header.add logoImage
  14.  
  15. header.add leftButtonObject if leftButtonObject?
  16. header.add rightButtonObject if rightButtonObject?
  17. windowObject.add header
  18.  
  19. return header
  20. else
  21. bz.ui.navBar = (args) =>
  22. {windowObject, backgroundURL, leftButtonObject, rightButtonObject, logoImageURL, options} = args
  23.  
  24. windowObject.barImage = backgroundURL if backgroundURL?
  25.  
  26. windowObject.leftNavButton = leftButtonObject if leftButtonObject?
  27. windowObject.rightNavButton = rightButtonObject if rightButtonObject?
  28. windowObject.titleImage = logoImageURL if logoImageURL?
  29.  
  30. return
Add Comment
Please, Sign In to add comment