M
M
mihzas2014-05-27 00:00:41
Android
mihzas, 2014-05-27 00:00:41

How to make a button invisible after clicking in android?

How to make a button invisible after clicking in android?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Obrezkov, 2014-05-27
@ghaiklor

@SolidlSnake People love to be searched for. At least we will know that we will be in price as long as there are such encoders :)

playButton = (Button) findViewById(R.id.play);
    playButton.setVisibility(1);
    playButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
             //when play is clicked show stop button and hide play button
             playButton.setVisibility(View.GONE);
             stopButton.setVisibility(View.VISIBLE);

        }
    });

K
Konstantin Dovnar, 2014-05-27
@SolidlSnake

In the handler, add hiding after clicking. Seriously. There is nothing more to tell here.
Or are you having a hard time finding the properties you need? Or do you not yet know how listeners work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question