I'm using StandardTitleBar from Blackberry 6.0
StandardTitleBar myTitleBar = new StandardTitleBar()
.addIcon("logo.png").addTitle("App Title").addClock()
.addNotifications().addSignalIndicator();
myTitleBar.setPropertyValue(
StandardTitleBar.PROPERTY_BATTERY_VISIBILITY,
StandardTitleBar.BATTERY_VISIBLE_LOW_OR_CHARGING);
setTitleBar(myTitleBar);
how to add Date to the StandardTitleBar, since it's only have addClock() method, no a开发者_JAVA技巧ddDate() method. Anyone can help ?
Where do you want to add the date (i.e. how should it show up?)? You can add it using Manager#add but then you may have to do your own layout. You can also just pass a date along with the title (i.e. addTitle("App Title" + myGetDate())).
There is no built in method in the API to add the date, so if you want a particular placement, then you're going to have to do your own layout. If you don't care for the clock, you can override addClock() and sublayout(). You can call super in sublayout, followed by the code to properly align your date.
精彩评论