Android Question Visibility of buttons when a Panel is placed on the activity [resolved]


Well-Known Member
Licensed User
Longtime User

I have an activity.
In the activity I have a Table, 3 buttons and a label
In the Activity I have a Panel which is hidden by default ie not visible
I have a SearchView placed on the Panel
When I click on the one of the Buttons on the Activity, I make this panel Visible and covers the entire activity area.

The whole intention is that when A button on the activity is clicked, I need to provide a searchview for the user. For this, I have placed a searchview on the Panel. This panel is made visible when the user clicks on the button. Once the user select an item from the searchview, there is done button available on the panel which makes the Panel Visible to False

Now my problem is here

When I make the panel visible, the buttons placed on the activity is still visible on top of the Panel and thes buttons are even clickable. It should be noted that only the Buttons are visible, the Table and rest of the views in the activity are not visible when the Panel is made visible or shown.

Referring the post on this thread , I simply included the following Sub for the Panel
Sub PnlSvCustomer_Click
End Sub

Unfortunately the buttons that are placed in the Activity ie below the panel is still visible and are clickable.

When the Panel is visible, and the Panel's size covers the entire activity area, I do not want the buttons to be visible.

I know that I can make the Button.Visible = False when the Panel is made visible, but then is it the right way ?
Then why the other views in the activity are not visible and only the buttons are visible over the Panel ?

Can anyone guide me where exactly I am wrong.
Last edited:


Licensed User
Longtime User
It is a problem with the elevation of the buttons.

In Material Design (and the Material Themes) objects have an elevation value. Default Button elevation is 2dip. If you create a Panel with 0dip elevation (default) your panel will show below the buttons.

Set the Panel elevation to 2dip or higher and it should work.
Upvote 0