Your problem seems to be here:
for (int j = 0;j < CATEGORY.length;j++) {
//Item item = new Item(Item.ITEM, section.text.toUpperCase(Locale.KOREA) + " - " + j);
Item item = new Item(Item.ITEM, CATEGORY[i]);
You're using the variable j
for iteration, but you're using i
as index.
Also your huge switch
code can be reduced like this
if (i<=5)
title = country[i];
Also, the LogCat says that it's unable to create the Activity, so the problem is probably on your onCreate()
method. If you're calling the code you posted from onCreate then what I wrote here could solve your problem, but maybe you're doing some other array manipulation that you didn't post.