I have an android application where the home screen is a tab view. One of the tab goes to an "Inbox" activity. I'd like to show a number that indicates the number new messages. This seem to be a standard feature on iPhone apps. Is there any sort of system support for this? If not, what's the easiest way to implement this effect for android tabviews?
From what I can read in the Android Sourcecode (TabHost.java) there is no way to do it with standard widgets in a similar fashion like iPhone.
What you could do is:
It's no replacement for the iPhone Style badge though, as the iPhone badge is quite nicely in the topRight corners of the label. And so far there is no way to change it.
On the other hand, this being all Java someone could extend the TabHost class and add support for iPhone style badges.
[1]: http://developer.android.com/reference/android/widget/TabHost.TabSpec.html#setIndicator(java.lang.CharSequence, android.graphics.drawable.Drawable)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With