Android Question Panel is not transparent

Shay

Well-Known Member
Licensed User
Longtime User
Hi

just created simple panel on design
added this code
but panel is not becoming transparent

B4X:
Sub Popup_Click

   Dim pnlInput As Panel
   pnlSelect.Initialize ("Select")
   pnlSelect.Color  = Colors.ARGB (150,0,0,0)
   Activity.AddView (pnlSelect, 0, 0,   100%x, 100%y)
  
End Sub

any idea why?
(I wish to have it semi-transparent, I also tried ARGB(0,0,0,0) - still no good)

Shay
 

Shay

Well-Known Member
Licensed User
Longtime User
This is code part from different thread here (to solve click event)
but basically there is a declare on main activity on this panel
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
works OK here ...
B4X:
'background panel for test only
Dim panel1 As Panel
panel1.Initialize ("")
panel1.Color  = Colors.Red
panel1.SendToBack
Activity.AddView (panel1, 20%x, 20%y,  60%x, 60%y)

Sub Popup_Click
  Dim pnlInput AsPanel
  pnlSelect.Initialize ("Select")
  pnlSelect.Color  = Colors.ARGB(150,0,0,0)
  Activity.AddView (pnlSelect, 0, 0,  100%x, 100%y)
End Sub
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
I will test later...
Do I need to add something to Mainfest?
No ..

If pnlSelect was declared in this activity's Globals ,your code should have worked ?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
ok, it was a mess in the code example that I got
your code is great
thanks
 
Upvote 0
Top