How to use getString() on static String before onCreate()?

前端 未结 5 1521
陌清茗
陌清茗 2020-12-17 10:09

I am trying to use getString() to get an String from resources to assign it to an String array before my activity is created:

private static fin         


        
5条回答
  •  盖世英雄少女心
    2020-12-17 10:44

    Whatever you get by the getString(int resId) will already be a constant for your application. Why do you have to keep it in another final static variable. You can read it like that whenever you want, right?

提交回复
热议问题