I am having a weird issue.
I am creating and adding an ImageView to a Panel programattically, but for some weird reason the controls or background that is behind the imageview is showing through slightly on my PNG files, like alpha issues.
I tried doing Alpha = 1 or using CSSUtils to set the background color, but its not doing anything. Not sure if there is a newer XUI way of doing it, but...
Here is my code:
After calling that subroutine, I then do this:
any ideas?
I am creating and adding an ImageView to a Panel programattically, but for some weird reason the controls or background that is behind the imageview is showing through slightly on my PNG files, like alpha issues.
I tried doing Alpha = 1 or using CSSUtils to set the background color, but its not doing anything. Not sure if there is a newer XUI way of doing it, but...
Here is my code:
B4X:
Sub SwitchAndInsertView(view As Int) 'Changes the content window to host an Image, or a Video.
If view = CurrentView Then Return 'If we are requesting the same thing as before, we just simply exit.
Main.pnlContent.RemoveAllNodes 'Remove all views from the Panel.
If view = 1 Then 'We are putting in an image.
Log("Initializing ImageView")
If imgContent.IsInitialized = False Then
imgContent.Initialize("imgContent")
End If
Main.pnlContent.AddNode(imgContent, 0, 0, pnlContentWidth, pnlContentHeight)
imgContent.Alpha = 1
imgContent.Width = pnlContentWidth
imgContent.Height = pnlContentHeight
CSSUtils.SetBackgroundColor(imgContent, fx.Colors.ARGB(255, 0, 0, 0))
' Else if view = 2 Then 'We are putting in a video
End If
CurrentView = view
End Sub
After calling that subroutine, I then do this:
B4X:
Dim img As Image
img.Initialize(FM.MediaDIR & PI.SubDir, PI.FileName)
imgContent.SetImage(img) 'Set the content to the specific image
imgContent.Visible = True
any ideas?