My app works great on my nexus 7 but when I load it on my cell phone and run it I get an error "An error has occurred in sub:main_sv_itemclick(java line: 775) Object should first be initialized(map)" Heres the code for the sv_itemClick
I don't get any errors when compiling.
also everything has scaled correctly except for the searchview which is code in a different module and I'm not sure how to scale that.
Thanks again for all your help.
If you need more information let me know.
B4X:
Sub sv_ItemClick(Value As String)
Dim id As String
Dim m As Map
Dim Val() As String
id = 0
LblFName.Visible = True
lblDJoined.Visible = True
lblbdate.Visible = True
lblassoc.Visible = True
lblpaid.Visible = True
imgview.Visible = True
lblsign.Visible = True
btnAssoc.Visible = True
Val = Regex.Split(",", Value)
m = DBUtils.ExecuteMap(SQL1, "SELECT mbr_first_name, mbr_last_name, address_1, city, state, zip_code, e_mail, home_phone, datej, description, birthd, duesp, assc_last_name, assc_first_name, mbr_prox, assoc_prox, reldate FROM mbrs where mbr_number = ?", Array As String(Val(2)))
If m = Null Then
lblFLName.Text = "N/A"
Else
id = m.Get("mbr_prox") ' load mbr prox into i
If File.Exists(File.DirRootExternal,"TCGCPhotos/"&id&".jpg") = True Then
picture = LoadBitmap(File.DirRootExternal,"TCGCPhotos/"&id&".jpg") 'this will load picture
imgview.SetBackgroundImage(picture) 'this will set picture
Else
picture = LoadBitmap(File.DirRootExternal,"TCGCPhotos/Noimages.jpg")
imgview.SetBackgroundImage(picture)
End If
lblFLName.Text = m.Get("mbr_first_name") & " " & m.Get("mbr_last_name")
lblAddress.Text = m.Get("address_1")
lblCSZ.Text = m.Get("city") & ", " & m.Get("state") & " " & m.Get("zip_code")
lblPhone.Text = m.Get("home_phone")
lblStatus.Text = m.Get("description")
lblEmail.Text = m.Get("e_mail")
lblJoined.Text = m.Get("datej")
lblBirth.text = m.Get("birthd")
lblduespaid.Text = m.Get("duesp")
btnAssoc.Text = m.Get("assc_first_name") & " " & m.Get("assc_last_name")
lblrel.Text = m.Get("reldate")
End If
End Sub
also everything has scaled correctly except for the searchview which is code in a different module and I'm not sure how to scale that.
Thanks again for all your help.
If you need more information let me know.