Hi all
I'm going to develop a new app that adopts qrcodeview, reads some qrcode and shows an associated html page inside a web view, related to the read url. I have some other function , so I need to have more pages.
I decided to use the demo found about StdActionBar (the one with 3 panels).
My app works fine but I get a crash when I try to load the page related to qrcodeview.
I have
Private qrcrv As QRCodeReaderView
I page a layout composed by a panel (panel2) including a qrcodereader object and two buttons b1 and b2 (as in the qrcodereader demo)
Sub b1_Click
qrcrv.Visible = True
DoEvents
qrcrv.startScan
End Sub
Sub b2_Click
qrcrv.stopScan
DoEvents
qrcrv.Visible = False
End Sub
Sub qrcrv_result_found(retval As String)
Msgbox(retval,"lettura")
End Sub
the tab_changed event is the same of the demo.
Sub bar_TabChanged(Index As Int, STab As StdTab)
Activity.RemoveAllViews
Dim pnl As Panel = STab.Tag
Dim height As Int
If 100%y > 100%x Then
height = 100%y - 48dip
Else
height = 100%y
End If
If pnl.NumberOfViews = 0 Then
pnl.LoadLayout(Index)
End If
Activity.AddView(pnl, 0, 0, 100%x, height)
End Sub
that is, I realized that qrcodereader work good as in the demo, but it does not work mashing up the two demos (stractionbar adn qrcode reader) . But when I use Activity.RemoveAllViews to delete al panels and next I try to
a) load the layout cointaining the qrcode object
b) try to add the panel to the activity
app crashes.
I think that is related to some missed initialize of the object, although it is contained inside the layout, so it should not be inizialied.
Any suggestion?
thanks in advance
alex
I'm going to develop a new app that adopts qrcodeview, reads some qrcode and shows an associated html page inside a web view, related to the read url. I have some other function , so I need to have more pages.
I decided to use the demo found about StdActionBar (the one with 3 panels).
My app works fine but I get a crash when I try to load the page related to qrcodeview.
I have
Private qrcrv As QRCodeReaderView
I page a layout composed by a panel (panel2) including a qrcodereader object and two buttons b1 and b2 (as in the qrcodereader demo)
Sub b1_Click
qrcrv.Visible = True
DoEvents
qrcrv.startScan
End Sub
Sub b2_Click
qrcrv.stopScan
DoEvents
qrcrv.Visible = False
End Sub
Sub qrcrv_result_found(retval As String)
Msgbox(retval,"lettura")
End Sub
the tab_changed event is the same of the demo.
Sub bar_TabChanged(Index As Int, STab As StdTab)
Activity.RemoveAllViews
Dim pnl As Panel = STab.Tag
Dim height As Int
If 100%y > 100%x Then
height = 100%y - 48dip
Else
height = 100%y
End If
If pnl.NumberOfViews = 0 Then
pnl.LoadLayout(Index)
End If
Activity.AddView(pnl, 0, 0, 100%x, height)
End Sub
that is, I realized that qrcodereader work good as in the demo, but it does not work mashing up the two demos (stractionbar adn qrcode reader) . But when I use Activity.RemoveAllViews to delete al panels and next I try to
a) load the layout cointaining the qrcode object
b) try to add the panel to the activity
app crashes.
I think that is related to some missed initialize of the object, although it is contained inside the layout, so it should not be inizialied.
Any suggestion?
thanks in advance
alex