code reference for http://fadils.github.io/LayoutInflater-Best-Practice/