Arda Çebi Arda Çebi - 1 year ago 86
Java Question

Making components invisible with button

How can I make a component on my MainUI invisible by pressing a button? I want to dismiss a warning box on my MainActivity with a button that says "Close" or with a cross image.

Answer Source
Button crossButton = (Button) findViewById(
Button button1 = (Button) findViewById(
//and so on

crossButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(View v){
        //and so on
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download