How can I remove a button or make it invisible in Android?

Set button visibility to GONE (button will be completely “removed” — the buttons space will be available for another widgets) or INVISIBLE (button will became “transparent” — its space will not be available for another widgets):

View b = findViewById(R.id.button);
b.setVisibility(View.GONE);

or in xml:

<Button ... android:visibility="gone"/>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)