Search code examples
androidandroid-listviewandroid-styles

Android ListView style - cycles in resource definitions


This code

<style name="listViewPrefs" parent="@android:Widget.ListView">
...
</style>

produces the following Android Rescources Validation error:

Invalid parent reference: expected @style. There should be no cycles in resource definitions as this can lead to runtime exceptions.

How can this be fixed?


Solution

  • I think you have to use like,

    <style name="listViewPrefs" parent="@android:style/Widget.ListView">
    ...
    </style>