Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

New Message Indicator

Is there a way to create a new message indicator similar to the small red icon with a number in it that shows up when you have a new email or facebook message?

— asked July 15th 2010 by Alex Garcia
  • indicator
  • message
  • new
0 Comments

2 Answers

  • Accepted Answer

    yup, you should grab Kitchen sink from here: http://github.com/appcelerator/KitchenSink

    its a great resource for checking out how to do things

    if it doesn't build just create a new project and copy over the resources directory

    if you want it on the app icon

    you will want to look in examples/app_badge.js or if browsing on the iPhone go to phone > app badge

    Titanium.UI.iPhone.appBadge = 20;
    

    or if you want it on a tab

    you will want to look in examples/tabs.js or if browsing on the iphone go to Base UI > tabs

    var tab = Titanium.UI.currentTab;
    tab.badge = 20;
    

    hope that helps

    — answered July 15th 2010 by Richie Mortimer
    permalink
    1 Comment
    • oops a little late - what Daniel said :)

      — commented July 15th 2010 by Richie Mortimer
  • Yes, it is named appBadge

    http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.iPhone-module, at the end of the page.

    you have a demo in KitchenSink in app_badge.js

    — answered July 15th 2010 by Dan Tamas
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.