Hi All, Can you point me to the tutorial which tells me which storage object I should use to save my app's calculations? My app mathematically multiplies length times width and gives a Result. I'd like to save that result for adding it to the successive pages' results for a running total on each successive page.
Thanks
Thanks
B4X:
Sub Globals
'Variables always Private in this sub SSS
Private Result As Double
Private lblFind As Label
Private lblResult As Label
Private edtLen As EditText
Private edtWidth As EditText
Private btnCalc As Button
Private pnlBitmap As Panel
Private lblNext As Label
Private lblTitle As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("math_layout")
pnlBitmap.Initialize ("")
Activity.AddView (pnlBitmap, 0%x, 270dip, 72%y, 190dip)
Private bdwBitmap As BitmapDrawable
bdwBitmap.Initialize(LoadBitmap(File.DirAssets, "Framing.jpg"))
bdwBitmap.Gravity = Gravity.FILL
pnlBitmap.Background = bdwBitmap
End Sub
Sub btnCalc_Click
Result = edtLen.Text * edtWidth.Text
lblResult.Text = Result & " Square Feet"
Log(Result & " Sq Ft")
End Sub
Sub lblNext_click
StartActivity(Page2)
End Sub
'*******New idea for saving areas- but!... save in what receptacle? Array? List?
Sub Save_Area
Dim SvAry As Array
'or.........
Dim SvLenandWid As List
SvLenandWid.Initialize
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Last edited: