I've got a class that extends a button. I want to add an additional attribute to it. Is there any way to initialize that attribute from XML? For example:
public class MyButton extends Button{ private String myValue = "";
<MyButton android:id="@+id/myBtn" myValue="Hello World"></MyButton> public class MyButton extends Button{ private String myValue = ""; public CalcButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } } }