problem filling string[] with string-array from strings.xml

后端 未结 3 884
别那么骄傲
别那么骄傲 2021-01-22 19:32

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

3条回答
  •  轮回少年
    2021-01-22 20:13

    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);
    

提交回复
热议问题