Radek
Radek

Reputation: 1413

android pop up menu

I have followed this tutorial to create a seek bar on a transparent background. How can I make it pop up on the screen when pressing a button ?

Upvotes: 0

Views: 599

Answers (1)

plowman
plowman

Reputation: 13585

You can add a button to your app and then use that to set the visibility of the seek bar from View.GONE to View.VISIBLE. Something like this:

final TransparentPanel transparentPanel = ... //however you initialize
transparentPanel.setVisibility(View.GONE); //make it invisible to start
button.setOnClickListener(new View.OnClickListener(){
    //Make the panel visible whenever someone clicks on your new button
    transparentPanel.setVisibility(View.VISIBLE);
});

//add the button to whatever ViewGroup transparentPanel lives in

Upvotes: 1

Related Questions