TabHostExtras question

parijs

Active Member
Licensed User
Hi, I use the TabHostExtras and loading the following code in order to place a pica.
However, the pica also appears on the following tabs, how can I prevent that?
And how do I change the text "TabHostExtras Demo" in the Activity.LoadLayout


B4X:
Activity.LoadLayout("Layout")
   Activity.AddMenuItem("Toggle tabs visibility", "ToggleTabs")

         TabHost1.AddTab("Map", "map")
         TouchImageView1.Initialize("TouchImageView1")
         Activity.AddView(TouchImageView1, 15, 65, 93%x, 90%y)
         TouchImageView1.MinScale=1         '   default is 0.5
         TouchImageView1.MaxScale=3            '   default is 1.5
         TouchImageView1.TranslatePadding=128dip   '   default is 64dip
         TouchImageView1.Gravity=Gravity.FILL
         TouchImageView1.SetBitmap(Bitmap30)
         SourceImageRect.Initialize(9, 65, Bitmap30.Width, Bitmap30.Height)
         TouchImageViewRect.Initialize(0, 0, TouchImageView1.Width, TouchImageView1.Height)

         TouchImageView1.ScaleSrcRectToDestRect(SourceImageRect, TouchImageViewRect, "CENTER")   

         TabHost1.AddTab("Tekst", "text") 
                        pnlHelp.LoadLayout("text2")
                        scvHelp.Panel.LoadLayout("text1")
                        Reflect.Target=lblHelp3
                        pnlHelp.BringToFront
                        pnlHelp.Enabled = False
                        pnlHelp.Top=0
                        pnlHelp.Left=0
                        pnlHelp.Height=Activity.Height
                        pnlHelp.Width=Activity.Width
                        pnlHelp.Invalidate
                        Activity.Invalidate
                        scvHelp.Height=Activity.Height-scvHelp.Top-2dip

                        scvHelp.Width=Activity.Width-2*scvHelp.Left
                        scvHelp.Panel.Width=scvHelp.Width
                        If Activity.Width/Activity.Height<1 Then
                        lblHelp1.Top=lblHelp2.Top
                        lblHelp1.Left=lblHelp2.Left
                        lblHelp2.Top=lblHelp1.Top+lblHelp1.Height
                        lblHelp1.Gravity=Gravity.LEFT
                        Else
                        lblHelp1.Gravity=Gravity.RIGHT
                        lblHelp1.Left=scvHelp.Width-lblHelp1.Width-2*lblHelp2.Left
                        End If
                        lblHelp2.Gravity=Gravity.LEFT
                        lblHelp3.Top=30dip
                        lblHelp3.Left=8dip
                        lblHelp3.Width=scvHelp.Panel.Width-30dip
                        lblHelp3.Height=-2
                        scvHelp.Invalidate
                        Dim Height As Float
                        scvHelp.ScrollPosition=0
                        lblHelp3.Text=textpage
                        DoEvents      ' needed to update the value

                        Height=Reflect.RunMethod("getHeight")   ' uncomment these lines with the Reflect object
                        DoEvents      ' needed to update the value
                        scvHelp.Panel.Height= lblHelp3.Top+Activity.Height+470dip

                        ' needed to update the height
                        If scvHelp.Panel.Width=scvHelp.Width OR scvHelp.Panel.Width=-1 Then
                        scvHelp.Panel.Width=scvHelp.Width-1
                        Else
                        scvHelp.Panel.Width=scvHelp.Width
                        End If
   TabHost1.AddTab("Info", "info") 
                        pnlHelp.LoadLayout("text2")
                        scvHelp.Panel.LoadLayout("text1")
                        Reflect.Target=lblHelp3
                        pnlHelp.BringToFront
 
Top