i have a typedArray that contains icons i want to use in my listview.when I tried to reference elements contained in the typedArray in the for-loop this.navDrawerIconsas shown below, eclipse gives an error as if the typedArray should not be referenced like normal arrays.
how can I reference the typedArray element by element from a loop
code
private void initViews() {
// TODO Auto-generated method stub
setContentView(R.layout.activity_main);
this.navDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
this.drawerListView = (ListView) findViewById(R.id.drawerListView);
this.navDrawerOptions = getResources().getStringArray(R.array.nav_drawer_items);
this.navDrawerIcons = getResources().obtainTypedArray(R.array.nav_drawer_icons);
this.navDrawerOptionDescription =
getResources().getStringArray(R.array.nav_drawer_items_descriptions);
this.navDrawerArrayList = new ArrayList<NavDrawerItemDesign>();
setNavDrawerArrayList(this.navDrawerArrayList);
for (int i = 0; i < this.navDrawerOptions.length; i++) {
changeSingleOptionContents(this.navDrawerOptions[i], this.navDrawerIcons[i], this.navDrawerOptionDescription[i],VISIBLE);
}
}