Bonjour tout le monde, j'ai un bug graphique sur une tabwidget. Je ne parviens pas à determiner l'origine de ce problème.
En fait, lorsque je change d'onglet, une barre blanche apparait.




Voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
Resources res = getResources();
		drawable_left_actif = res.getDrawable(R.drawable.velostar_ios_onglet_gauche_actif2);
		drawable_left_inactif = res.getDrawable(R.drawable.velostar_ios_onglet_gauche_inactif2);
		drawable_right_actif = res.getDrawable(R.drawable.velostar_ios_onglet_droite_actif2);
		drawable_right_inactif = res.getDrawable(R.drawable.velostar_ios_onglet_droite_inactif2);
 
		tabHost.getTabWidget().setPressed(false);
 
		tabHost.getTabWidget().getChildAt(0).setBackgroundDrawable(drawable_left_actif);
		tabHost.getTabWidget().getChildAt(1).setBackgroundDrawable(drawable_right_inactif);

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
public void onTabChanged(String tabId) {
		if(tabHost.getCurrentTab() == 0){
			tabHost.getTabWidget().getChildAt(0).setBackgroundDrawable(drawable_left_actif);
			if(tabHost.getTabWidget().getChildAt(1) !=null){
				tabHost.getTabWidget().getChildAt(1).setBackgroundDrawable(drawable_right_inactif);
			}
		}
		else{
			tabHost.getTabWidget().getChildAt(0).setBackgroundDrawable(drawable_left_inactif);
			tabHost.getTabWidget().getChildAt(1).setBackgroundDrawable(drawable_right_actif);
		}
	}