Click on a button and make another

1

How do I do when I click on botao1 and make botao2 and botao3 appear on the screen? I left botao2 and botao3 visibility = invisible .

    
asked by anonymous 24.08.2016 / 03:12

1 answer

2

This is simple to do, just use onClick of botao1 to make others appear?

botao1.setOnClickListener( new OnClickListener( ) 
{
    @Override
    public void onClick( View v ) 
    {
         botao1.setVisibility( View.GONE    );  //desaparece o 1
         botao2.setVisibility( View.VISIBLE );  //aparece o 2 
         botao3.setVisibility( View.VISIBLE );  //aparece o 3
    }
});
    
24.08.2016 / 03:20