I\'ve got a following problem. I want to customize appearance of row in a list, but exception is thrown during inflating.
piece of code in style.xml
<
The problem has been solved. I used application context to create adapter, when I changed context to activity the problem disappeared.
Try to create the themes.xml
file and add the below lines in it.
Themes.xml
<style name="Theme">
<item name="item_shadowColor">@style/item_label</item>
</style>
attrs.xml
Change the the format="reference"
in your attrs.xml
file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="item_shadowColor" format="reference" />
</resources>
styles.xml
<style name="AppTheme.Main">
<item name="item_shadowColor">#000000</item>
</style>
<style name="item_label">
<item name="android:shadowColor">#F240FF</item>
</style>
Then after define your style to the TextView as below:
<TextView
android:id="@id/title"
style="@style/item_label"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>