B4J Question cannot show imageview in mainform

cirollo

Active Member
Licensed User
Longtime User
Hi! I've a layout called "main" with an imageview on it and a png file (I see it in the WYSIWYG designer).
In the code I call the layout in this way

B4X:
Sub AppStart (Form1 As Form, Args() As String)
  ' msgbox.Show("put test.mp4 beside me(under objects)","info")
   'creo prima la tabella sql
   Sql1.InitializeSQLite(File.DirApp, "video.db", True)
   Try
     Sql1.ExecNonQuery("drop table lista")
     Sql1.ExecNonQuery("create table lista (nomefile text, sequenza int)")
   Catch
     Log("tabella esistente")
   End Try
   'leggo dal file di configurazione quale e' il percorso dei files
   Dim tr As TextReader
   tr.Initialize(File.OpenInput(File.DirApp,"parametri.txt"))
   Dim st As String = tr.ReadLine
   Do While st <> Null
     Log(st)
       If (st.SubString2(0,4) = "path") Then
         cartella=st.SubString(5)
     End If
         st = tr.ReadLine
   Loop
   Log(cartella)
   MainForm = Form1
   MainForm.RootPane.LoadLayout("main")
  MainForm.Title="Gemitex Video"
  MainForm.SetFormStyle("UNDECORATED")'no win title
  MainForm.WindowLeft=0
  MainForm.WindowTop=0
  MainForm.WindowHeight=fx.PrimaryScreen.MaxY
  MainForm.WindowWidth=fx.PrimaryScreen.MaxX
   MainForm.Show
   'leggo dal file presente nella cartella sincronizzata la sequenza dei video
   videoattuale=1
   'elenco_video
End Sub

but I get only a gray screen......where's the error???
 
Top