Android custom view attributes programmatically. So it would not be wise to inflate the view in it.