Evening,
I have been trying to figure out how to get the following files:
Billing and Coding Page 1 thru 6 .jpg in the following code by Erel.
I have tried what others mentioned:
panels(i).Bitmap = LoadBitmap(File.DirAssets, "Billing and Coding Page 1.jpg")
When inserting this in the area that has the label lines, that I commented out, I get a Bitmap error saying its the wrong use.
Any ideas?
Thanks,
R
I have been trying to figure out how to get the following files:
Billing and Coding Page 1 thru 6 .jpg in the following code by Erel.
B4X:
Sub Globals
Dim sd As SlidingData 'The object that holds the data for SlidingPanels
Dim btnLeft, btnRight As Button
Dim startX, startY As Float
Dim SlidingDuration As Int
SlidingDuration = 500
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Create the panels.
'In this example we are just creating 8 "dummy" panels with different colors.
'You can instead load a different layout to each panel.
Dim panels(3) As Panel
For i = 0 To panels.Length - 1
panels(i).Initialize("panels")
panels(i).Color = Colors.RGB(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255))
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "I'm Panel: " & i
lbl.TextSize = 20
lbl.TextColor = Colors.White
panels(i).AddView(lbl, 20%x, 40%y, 60%x, 30dip)
Activity.AddView(panels(i), 100%x, 0, 100%x, 100%y - 60dip) 'add the panel to the layout
Activity.AddMenuItem("Panel #" & i, "Menu")
Next
'add the Left and Right button
btnLeft.Initialize("Left")
btnLeft.Text = "Left"
Activity.AddView(btnLeft, 10%x, 100%y - 55dip, 100dip, 50dip)
btnRight.Initialize("Right")
btnRight.Text = "Right"
Activity.AddView(btnRight, 60%x, 100%y - 55dip, 100dip, 50dip)
I have tried what others mentioned:
panels(i).Bitmap = LoadBitmap(File.DirAssets, "Billing and Coding Page 1.jpg")
When inserting this in the area that has the label lines, that I commented out, I get a Bitmap error saying its the wrong use.
Any ideas?
Thanks,
R