更新时间:2023-08-19 16:39:28
?我只是碰到了完全相同的问题,但发现如果我产生这样的我的数组适配器:
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);
然后文本是出现白色。但是,如果我用的活动范围内(所以如果我做了上面的onCreate方法,我可以只使用本)的文字是黑色的。我想,不知我的应用程序是压倒一切的主题。也许这就是/是你的问题呢?
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?