Hi Everyone, i need some help, maybe i'm missing something, but i am working on a Range SeekBar CustomView and i need to draw a bitmap using the Canvas or B4XCanvas classes, everything seems fine until i call the Rect.Initialize(pnlHighlighted) method.
Please refer to the two images attached, the first image shows basically 2 panels inside the mBase panel in the CustomView class.
You Will see a panel with black borders which is the Parent Panel, inside this panel i am adding another panel which is the pnlHighlighted panel in which i need to draw the highlighted slide bar bitmap so that It can track the position of either the left knob or the right knob.
This is where i set the pnlhighlighted size parameters.
And this is where I add the panel to the parent view.
The issue i'm seeing is that as soon as I call this method.
The second image shows what the issue is, as you can see the height of the parent and pnlhighlighted panels decrease, even though the pnlhighlighted panel is the same size as the parent panel when it's added to the parent panel.
Why is this happening, does anyone have any suggestions, I know there must be something i must be doing wroing, but can't figure out what.
Has anyone came across this issue and how this you solve it?
Thanks,
Walter
Please refer to the two images attached, the first image shows basically 2 panels inside the mBase panel in the CustomView class.
You Will see a panel with black borders which is the Parent Panel, inside this panel i am adding another panel which is the pnlHighlighted panel in which i need to draw the highlighted slide bar bitmap so that It can track the position of either the left knob or the right knob.
This is where i set the pnlhighlighted size parameters.
Panel Parametes:
pnlhighlighted.SetLayoutAnimated(0,0,parent.Left, parent.top, parent.Width,parent.Height)
B4X:
parent.AddView(pnlhighlighted, 0, 0, parent.Width, parent.Height)
The issue i'm seeing is that as soon as I call this method.
Canvas Initialization:
''Canvas to draw the highlighted slidebar bitmap
cvshighlighted.Initialize(pnlhighlighted)
Why is this happening, does anyone have any suggestions, I know there must be something i must be doing wroing, but can't figure out what.
Has anyone came across this issue and how this you solve it?
Thanks,
Walter