Issue
How can I remove a button in Android, or make it invisible?
Solution
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"/>
Answered By - Konstantin Burov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.