This is not so much a problem, more a question about how to achieve
something...
I have a tabhost with three tabs. I have 6 icons, 3 in colour and 3 an
exact copy but in grayscale.
What I want to do is have the coloured version of the icon displayed
when the tab is active i.e. being viewed. Otherwise I want the other
inactive tabs to show the grayscale version of their icon - and change
to the coloured version if they are clicked.
So I want a tab to show a coloured icon if active and a grayscale icon
if inactive...
Any ideas how to achieve this anyone?
I have played around with the TabHost onTabChangeListener but havent
been able to find a solution.
Ideally I need something like:
tabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
public void onTabChanged(String arg0) {
int selectedTab = tabs.getCurrentTab();
// Update newly selected tab to display
colorful icon
// Update previously selected tab to
display greyscale icon
}
});
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---