We have in our project a keyboard with \"Key\" elements, this Key elements have attributes such as android:codes=\"119\", android:keyLabel=\"w\" and so on.
My questi
For any other purpose, declaring a custom property in the XML file can be retrieve with attrs constructor parameter.
In my case I reuse a preference custom dialog, and set things like that:
Then in my class contructor:
public CustomView(Context context, AttributeSet attrs) {
String bar = attrs.getAttributeValue(null, "foo");
Log.d("CustomView", "foo=" + bar);
}