Android Hide and Show buttons from a condition

Your button is in the XML layout, so you can hide it or show it by just changing its visibility NB: You only need do these operations once: Get a reference to your button, with findViewById() Set the OnClickListener of the button   <Button android:id=”@+id/admin_new_questions”...