how to use visible and invisible for a button in android

前端 未结 4 529
迷失自我
迷失自我 2021-02-04 06:29

I want to make a button invisible, when i click another button then the invisible button will become visible and then perform onClick() actions on the visible butto

4条回答
  •  长情又很酷
    2021-02-04 06:54

    DONT USE -

    donebutton.setVisibility(4);
    

    Instead use the static constants for this:

    donebutton.setVisibility(View.VISIBLE);
    

    What exactly means

    done.setVisibility(0);
    

    Isn't is supposed to be

    donebutton.setVisibility(View.GONE);
    

提交回复
热议问题