The app doesn't get the localization change effect on nougat api 7 ++

前端 未结 1 766
后悔当初
后悔当初 2020-12-21 13:15

I have a custom adapter for my spinner:

ArrayAdapter adapter = new ArrayAdapter(context, android.R.layout.simple_spi         


        
相关标签:
1条回答
  • 2020-12-21 13:56

    This issue fixed after passing the Activity context instead of applicationContext to the spinnerAdapter.

    Simply I changed spinnerAdapter = new SpinnerAdapter(getApplicationContext()); to spinnerAdapter = new SpinnerAdapter(MainActivity.this);

    A REF.

    0 讨论(0)
提交回复
热议问题