I have several buttons in my current app. They are all identical except for their text and a tag. The main.xml would be a lot nicer if I didn\'t have to repeat all the button
You can make a custom view that extends button and sets all the things that is repeating. Then you can use it as you described, but with a fully qualified name, not just shortname.
class MyButton extends Button {
public MyButton() {
// Set the values you want
}
}