Problème d'affichage d'informations
Bonjour je développe une application et j'utilise un action bar pour afficher mon menu et je voudrais en fonction de l'item sélectionné afficher du texte. Voici mon code
Code:
1 2 3 4 5 6
| TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
Pos=Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER));
if (Pos=="1")
{
dummyTextView.setText("Informations sur le salon");
} |
Mon soucis est que rien ne s'affiche quand j'exécute mais lorsque j'enlève la condition et que je laisse le code ainsi
Code:
1 2 3
| TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
Pos=Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER));
dummyTextView.setText(Pos); |
il m'affiche le numéro de la section en fonction de l'item sélectionné. Aidez moi svp!!!