As I know you have 2 options:
- Create your own view that extends
TextView and has constructor that takes AttributeSet. Then you can get custom property in this constructor. Check this tutorial: Creating a View Class.
- Implement own LayoutInfalter.Factory where you handle custom attributes.
Better check this question: How to read custom attributes in Android it's almost the same.