How to set a theme to whole application in code, but not in the Manifest?

前端 未结 6 1526
萌比男神i
萌比男神i 2020-12-16 17:11

I know how to set theme to whole application in manifest,but how to set theme to whole application programmatically ? I am trying this: getApplicationContext.se

6条回答
  •  猫巷女王i
    2020-12-16 17:54

    In setTheme, the documentation says:

    Note that this should be called before any views are instantiated in the Context (for example before calling setContentView(View) or inflate(int, ViewGroup)).

    Have you taken care of that?

提交回复
热议问题