Overriding referenced style attributes

夙愿已清 提交于 2019-11-26 19:05:28
Mikooos

I think you need that line in your theme

<item name="android:checkedTextViewStyle">@style/ListViewCheckedTextViewRowStyle</item>

so it would look like this:

<style name="Theme.Yellowgreen" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:listChoiceIndicatorMultiple">@drawable/btn_check_holo_light</item>
    <item name="android:checkedTextViewStyle">@style/ListViewCheckedTextViewRowStyle</item>
</style>

UPDATE

After question update and some additional information form comments we found that the problem was in Context. It's the same mistake I did in that my question: Android color selector doesn't work with custom attributes

To one fragment was passed Activity and to the other Application. I'm not an expert but even both of those classes are extending Context only the Activity extends ContextThemeWrapper, which has information about styles. It might be helpful to read that article for future understanding Context: http://www.doubleencore.com/2013/06/context/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!