Exactly, you can extend your textview like that
public class CustomTV extends TextView {
public final String YOURATTRS;
public CustomTV(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.CustomTV);
YOURATTRS = ta.getString(R.styleable.CustomTV_binding);
ta.recycle();
// use your attrs or not
}
and the attrs.xml :