我有一个Spinner并使用ArrayAdapter。在适配器中,我使用"android.R.layout.simple_list_item_1",如下所示:
spinnerControlObjectType.setAdapter(new ArrayAdapter(getApplicationContext, android.R.layout.simple_list_item_1, list))
我查看了android.R.layout.simple_list_item_1并发现它具有以下文本样式:
android:textAppearance="?android:attr/textAppearanceListItemSmall"
我想在我的主题中覆盖"textAppearanceListItemSmall",以便给它不同的颜色,我该怎么做?我不想子类化任何东西或编写样板代码。我确定有一种方法可以只通过更改theme.xml来更改颜色。
在android文档中写道:“...引用样式属性实际上是说,“在当前主题中使用由此属性定义的样式。”...' (http://developer.android.com/guide/topics/resources/accessing-resources.html#ReferencesToThemeAttributes)。他们说“定义”和“在当前主题中” - 我该如何在我的当前主题中定义它?让我抓狂...