I'm making custom LayoutInflater.Factory and in onCreateView() method I'd like to obtain custom attribute specified for current view. However I don't want to declare styleable for this attribute. I can get this parameter if it was specified in xml attribute for this View using:
attrs.getAttributeValue(null, attributeName);
I can even get it if it was specified in style parameter of the View using:
context.obtainStyledAttributes(attrs, new int[]{R.attr.custom_attribute);
However it seems to be impossible to get this attribute if it's specified in theme. Any help would be appreciated.
Here is my xml resouces:
<style name="CustomTheme"
parent="android:Theme.DeviceDefault">
<item name="android:textViewStyle">@style/TextView.Custom</item>
</style>
<style name="TextView.Custom">
<item name="custom_attribute">"blabla"</item>
</style>
P.S. I know I should declare slyleable resource for custom attributes, and it works if I do so, but I want to be sure it is not possible otherwise because it is simplier to use this way.