Sub Globals
Type Category(Text As String, Notes As String, IsNew As Boolean)
Dim btAddCategory As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
btAddCategory.Initialize("btAddCategory")
Activity.AddView(btAddCategory, 50dip, 50dip, 100dip, 45dip)
End Sub
Sub btAddCategory_Click
Dim intent_ As Intent
Dim edit_category As Category
'Populate Category Item
edit_category.Initialize
edit_category.Text = "Wine"
edit_category.Notes = "Original Notes"
edit_category.IsNew = False
'Set up Intent
intent_.Initialize("", "")
intent_.PutExtra("FromActivity", "CategoryManager")
intent_.PutExtra("cat", edit_category)
intent_.PutExtra("Sub_To_Call", "InsertCategory")
'Check list of Extras, and cat is missing
Log(intent_.ExtrasToString)
intent_.SetComponent(GetPackageName & "/.categorymanager")
StartActivity(intent_)
End Sub
Sub GetPackageName As String
Private r As Reflector
Return r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
End Sub