if you want to visible icon ic_back.visibility = View.VISIBLE and if you want to visibility GONE so please try it : ic_back.visibility = View.GONE