AFAIK,默认tab_indicator.xml具有样式属性。但是对于默认的 ListView 布局simple_list_item_1.xml没有它。所以这是不可能的。但是您可以通过 ListView 的自定义适配器来实现它。
编辑:
您只能使用自定义适配器来自定义列表项。它在ArrayAdapter 文档中提到。
从文档:
A ListAdapter that manages a ListView backed by an array of arbitrary objects. By default this class expects that the provided resource id references a single TextView. If you want to use a more complex layout, use the constructors that also takes a field id. That field id should reference a TextView in the larger layout resource. However the TextView is referenced, it will be filled with the toString() of each object in the array. You can add lists or arrays of custom objects. Override the toString() method of your objects to determine what text will be displayed for the item in the list. To use something other than TextViews for the array display, for instance, ImageViews, or to have some of data besides toString() results fill the views, override getView(int, View, ViewGroup) to return the type of view you want.