I built a two item menu on a new Nexus 7. It worked Fine.
I tried it on a tablet with a slightly older version of Android. An Insignia running 4.1.1.
The menu does not open. I have stepped through the code with the debugger and
Activity.OpenMenu is definitely run, but nothing happens. The code to create the menu also runs.
Here is the relevant code:
Any ideas greatly appreciated
I tried it on a tablet with a slightly older version of Android. An Insignia running 4.1.1.
The menu does not open. I have stepped through the code with the debugger and
Activity.OpenMenu is definitely run, but nothing happens. The code to create the menu also runs.
Here is the relevant code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim InterCon As ServerSocket
If FirstTime Then
If Not(File.Exists(File.DirInternal, "PartsAndTime.db")) Then
SQL1.Initialize(File.DirInternal, "PartsAndTime.db", True)
SQL1.ExecNonQuery("CREATE TABLE EmpInfoLookups (Emp_Num TEXT PRIMARY KEY NOT NULL, Emp_FirstName TEXT, Emp_LastName TEXT, Emp_AllowEdits INT, Emp_Rate TEXT);")
SQL1.ExecNonQuery("CREATE TABLE ReleaseLookups (JobRel TEXT, Jr_JobNum TEXT, Jr_ReleaseNum TEXT, StartDate TEXT, FirstDueDate TEXT, FinishDate TEXT, Jr_StartQty Int, Jr_MinDueQty Int, Jr_RejectQty Int, Jr_Complete TEXT, PictureName TEXT);")
SQL1.ExecNonQuery("CREATE UNIQUE INDEX JobRel on ReleaseLookups (JobRel );")
SQL1.ExecNonQuery("CREATE TABLE OPsLookups (Os_ID Int, Os_JobNum TEXT, Os_ReleaseNum TEXT, Os_SeqNum Int, Os_WCCode TEXT, Os_Description TEXT, Os_QtyTodate Int, Os_Note TEXT, Os_Status TEXT, Os_RunTime REAL, Os_OMLink Int, Wc_Cell Text, Wc_TypeCode TEXT);")
SQL1.ExecNonQuery("CREATE UNIQUE INDEX JobRelSeq on OPsLookups (Os_ID);")
SQL1.ExecNonQuery("CREATE TABLE JobsLookups (Jb_Job_Num TEXT PRIMARY KEY Not Null, Jb_Part_Num TEXT, Jb_Part_Rev TEXT);")
Else
SQL1.Initialize(File.DirInternal, "PartsAndTime.db", False)
End If
End If
Activity.LoadLayout("Main")
Activity.AddMenuItem("Setup", "IPISetup")
Activity.AddMenuItem("Close Program", "IPIClose")
UpdateJobCycleBtn.Tag = False
UpdatePMCycleBtn.Tag = False
Dim InterCon As ServerSocket
InterCon.Initialize(0, "")
MainIPAddr = InterCon.GetMyIP
InterCon.Initialize(0, "")
MainIPAddr = InterCon.GetMyIP
End Sub
Sub Activity_KeyPress(KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If SCV.IsInitialized Then
If SCV.Visible Then
SCV.Visible=False
SCV.RemoveView
Else
Activity.OpenMenu
End If
Else
Activity.OpenMenu
End If
Return True
End If
End Sub
Any ideas greatly appreciated