Re: [android-developers] Cannot peek value from TypedArray

2013-12-09 Thread Y2i
I ended up creating a custom UI element and using obtainStyledAttributeshttp://developer.android.com/reference/android/content/res/Resources.Theme.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int). It is not exactly what I wanted but it works :) On Monday, December 2,

Re: [android-developers] Cannot peek value from TypedArray

2013-12-02 Thread Justin Anderson
What happens if you use this version of obtainStyledAttributes()? *final TypedArray a = theme.obtainStyledAttributes(R.style.MyText, attrs); * Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sat, Nov 23, 2013 at 10:10 AM, Y2i yur...@gmail.com wrote:

Re: [android-developers] Cannot peek value from TypedArray

2013-12-02 Thread Y2i
Exactly the same story :( On Monday, December 2, 2013 9:44:15 AM UTC-8, MagouyaWare wrote: What happens if you use this version of obtainStyledAttributes()? *final TypedArray a = theme.obtainStyledAttributes(R.style.MyText, attrs); * Thanks, Justin Anderson MagouyaWare Developer

Re: [android-developers] Cannot peek value from TypedArray

2013-12-02 Thread Justin Anderson
Have you tried obtainAttributes? I know it may not be what you want, but if obtainAttributes works then that means there is something going on in the logic of obtainStyledAttributes that is causing weird behavior... Perhaps you found an Android bug... Thanks, Justin Anderson MagouyaWare

[android-developers] Cannot peek value from TypedArray

2013-11-23 Thread Y2i
I have a style style name=MyText item name=android:background#ffc0c0c0/item item name=android:textColor#8080/item /style which I am trying to introspect in my ocde. I use this code to retrieve typed array: final Resources.Theme theme = getActivity().getTheme(); final int[] attrs