How to pass custom component parameters in java and xml
问题 When creating a custom component in android it is often asked how to create and pass through the attrs property to the constructor. It is often suggested that when creating a component in java that you simply use the default constructor, i.e. new MyComponent(context); rather than attempting to create an attrs object to pass through to the overloaded constructor often seen in xml based custom components. I\'ve tried to create an attrs object and it doesn\'t seem either easy or at all possible