Problem running a compiled/packaged-with-v1.6 application on v1.5

by Armond Avanes » Wed, 04 Nov 2009 20:16:20 GMT


Sponsored Links
 ance,

Digging further showed that it was the problem with my "theme customization".

The default "preference_category.xml" is referring to
"listSeparatorTextViewStyle" as its style. But I've customized the
"listSeparatorTextViewStyle" and for whatever reason it does not correctly
inherit the "layout_width" and "layout_hight" attributes from Android default
theme.

In my "themes.xml":
<item
name="android:listSeparatorTextViewStyle">@style/Widget.TextView.ListSeparator</item>

In my "styles.xml":
<style name="Widget.TextView.ListSeparator"
parent="android:Widget.TextView.ListSeparator">
<item name="android:background">@drawable/blue_header</item>
</style>

Solution: I just copied all the attributes from Android default
"Widget.TextView.ListSeparator" and the problem got fixed! No other changes,
including the ones I just mentioned in my previous reply, are needed:

<style name="Widget.TextView.ListSeparator"
parent="android:Widget.TextView">
<item name="android:background">@drawable/blue_header</item>

<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">25dip</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">14sp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:paddingLeft">5sp</item>
</style>

And I guess this is the final solution for those whom want to customize their
"ListView"s (and the related separator). But I still can't understand why this
occurs when the build/packaging platform is not the same as the deployment one.
Hope someone from Android engineering team answers me.

Best Regards,
Armond



----- Original Message ----
> >