EDIT: woah ... somehow i replaced this question with another one i was asking, glad there is this rollback feature
this specific question deals with the
suggest not to define an array in advance, and used directly without defining a variable
mAutoComplete.setAdapter (new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, getResources().getStringArray(R.array.OmskStreets)));
and more..
in Class
private String[] mStreets = null;
and in onCreate method
mStreets = getResources().getStringArray(R.array.OmskStreets);
Shouldn't define anything about UI before onCreate().
Moreover, the following is a poor coding example, but it works.
public void onCreate(Bundle icicle){
super.onCreate(icicle);
...
...
...
COUNTRIES = getResources().getStringArray(R.array.COUNTRIES_ARRAY);
i know this is poor coding, apologies in advance. so to fix this problem, i moved
String[] impactsn;
impactsn = getResources().getStringArray(R.array.impacts);
to my main activity and made it static. now i refer to it within my Impacts class as (MainActivity).impactsn[]
i know this is not how you are supposed to share objects between classes, but it seems to be the easiest way so far. this is yet another reason why i am regretting my decision to make all of my tabs seperate activities. if you have any suggestions or advice on how to fix this code without using static references or on reasons why all of my tabs should be the same activities, please chime in.