Change tab title or background programmatically to flag a new unread message

27 views
Skip to first unread message

Matheus Henrique da Silva

unread,
Dec 11, 2014, 3:23:54 PM12/11/14
to ya...@googlegroups.com

Im developing a chat app based on PircBotX library.

Each conversation is in a fragment ordened by tabs.

Visually flag a tab that haves a new unread message is a very important feature of the app. To do this i have to change the color of the text or the background of the tab.

So i decided to use an actionbar with tabs, setting customviews in the tabs instead of pure text. Everything was working ok, i could recover the textview from the custom view of the tab, then change it as i want.

But android knocked me down when ive face this bug: https://code.google.com/p/android/issues/detail?id=41392, that means that the title of a tab with a custom view doesnt appear in landscape mode.

So, what i need to know, is another way to show tabs where i can programmatically change the title or background color of any tab, anytime.

Ive spent so many time searching for a working thing but unsuccess. What i want to do is something like the yaaic does. It changes the color of the tab that haves a new message.

Please help me, thanks in advance.

Reply all
Reply to author
Forward
0 new messages