I have a custom view in Android and want to load all attributes set on the custom view by the the attrs and the TypedArray. I define for instance a backcolor property in the xml layout but cannot load it in the constructor.
I did an attempt but without success.
// To be done, get the background color from the attributes.
TypedArray l_typedArray = this.getContext().obtainStyledAttributes(attrs,?? , 0);
// not working Color backColor = l_typedArray.getColor()
The attributes you can read here are in the attrs.xml in the values\attrs.xml - Can look as follows