12
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
<style name="AppTheme.Main">
<item name="item_shadowColor">#000000</item>
</style>
<style name="item_label">
<item name="android:shadowColor">?attr/item_shadowColor</item>
</style>
attr.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="item_shadowColor" format="color" />
</resources>
list_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@id/title"
style="@style/item_label"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
And the exception
FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #7: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:606)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at ru.mts.goodok.adapter.CategoryListAdapter.getView(CategoryListAdapter.java:30)
at android.widget.AbsListView.obtainView(AbsListView.java:2052)
at android.widget.ListView.mak