Issue
I have following string resource defined in strings.xml
<string name="years">Years</string>
In following 2 ways i am trying to use it
showUserSelectedExperience.setText("0"+R.string.years);
showUserSelectedExperience.setText(String.valueOf(experience.getProgress())+R.string.years);
Following incorrect output i am getting
02131361882
But correct output i should get : 0 years, 1 years like that
what can be the problem and what are the possible solutions?
Solution
Use
showUserSelectedExperience.setText("0"+getResources().getString( R.string.years));
Answered By - Tapa Save
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.