Reputation: 1413
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
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