:sign0085:
Hello there,
i m working on an application in wich i am loading an image in upper half of the screen. the lower half has some buttons. i've kept 4 transparent buttons on the image to sense the touch on different area of the image. now based on the button touch i m replacing the image with a new image. this is done using the panels.
while loading the second panel, the image portion gets loaded correctly but the lower portion of the screen becomes black. i want this lower half to be always there irrespective of any image load and unload on top half.
basically, i m trying to use the layers/planes concept of TFT, where only the targeted area is changed and rest area is static. how to do this using b4a.
any example would be greatly appreciated as i m starting with android app dev.
attaching my code snippet for reference.
i guess someone would have come across simillar situlation..
thanks in advance.
Hello there,
i m working on an application in wich i am loading an image in upper half of the screen. the lower half has some buttons. i've kept 4 transparent buttons on the image to sense the touch on different area of the image. now based on the button touch i m replacing the image with a new image. this is done using the panels.
while loading the second panel, the image portion gets loaded correctly but the lower portion of the screen becomes black. i want this lower half to be always there irrespective of any image load and unload on top half.
basically, i m trying to use the layers/planes concept of TFT, where only the targeted area is changed and rest area is static. how to do this using b4a.
any example would be greatly appreciated as i m starting with android app dev.
attaching my code snippet for reference.
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim pnl1stLayout As Panel
Dim pnl2ndLayout As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
pnl1stLayout.Initialize("")
pnl2ndLayout.Initialize("")
Activity.AddView(pnl1stLayout,0,0,800,480)
pnl1stLayout.LoadLayout("plantArea")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnExit_Click
Activity.Finish
End Sub
Sub btnRed_Click
pnl1stLayout.RemoveView
Activity.AddView(pnl2ndLayout,200,0,600,300)
pnl2ndLayout.LoadLayout("redArea")
End Sub
Sub btnBack_Click
pnl2ndLayout.RemoveView
Activity.AddView(pnl1stLayout,0,0,800,480)
pnl1stLayout.LoadLayout("plantArea")
End Sub
i guess someone would have come across simillar situlation..
thanks in advance.