text in top (status) bar
Some apps (notably Lookout Mobile Security) show a text describing action done for a short time (maybe 1 sec only) on the top (status) bar and then the display goes back to the regular 开发者_JS百科status bar (with a nice animation effect at least on HTC phones). How is this done ? I am not talking about notifications !
This is actually part of the Notification
. It is called the tickerText
.
See:
http://developer.android.com/reference/android/app/Notification.html#tickerText
And, if developing on HoneyComb:
http://developer.android.com/reference/android/app/Notification.html#tickerView
You can also pass the tickerText
into the constructor of the Notification
.
I think the function Activity.setTitle() is what you're looking for.
Edit:
Or, you could produce a custom notification that only appears for one second.
精彩评论