Android: text color holo light

后端 未结 2 1503
-上瘾入骨i
-上瘾入骨i 2021-01-05 20:13

I just have a stupid question... I am using (or better, I suppose to use) the theme holo light in my application: I have set it in the manifest file. Look at the screenshot

相关标签:
2条回答
  • 2021-01-05 20:54

    When you create your Adapter, are you using the application context or the activity? I just ran into the exact same problem but noticed if I generated my Array Adapter like this:

    ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(getApplicationContext(),
                        android.R.layout.simple_list_item_1, tables);
                setListAdapter(listAdapter);
    

    Then the text was appearing white. If, however, I used the activity context (so if I was doing the above in the onCreate method, I could just use "this") the text was black. I think somehow my app was overriding the theme. Perhaps that is / was your issue as well?

    0 讨论(0)
  • 2021-01-05 21:03

    It looks as if you are picking up the default theme, which has a default text colour of #bfbfbf. My guess would be that you are running the app on a 2.x version of Android, which does not have the Holo light theme installed.

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