Hey, I have a lot of Strings so I put them on a .xml, And I also have an ExpandableListView, and each child refers to a String.
I have named each String in the xml like: “String3_1” .. which means this String is for Group 3 Child 1 in the the ExpandableListView..
When switching activity after clicking in one of the childs, I send the GroupNum and ChildNum and I form the a new String:
Intent myIntent=getIntent();
child = myIntent.getStringExtra("GroupNum");
group=myIntent.getStringExtra("ChildNum");
String finalstring="String"+child+"_"+group;
Now how I call the String in the resources?
getString(resId) gets the String itself not the title of it so I cant compare it with the finalstring
Thanks.
1 Answer