Android Question solved:my TabStripPageViewer needs ScrollView

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't see any Page4 in your program.

It also crashes because of a missing file.

This code looks wrong to me:
B4X:
If FirstTime Then
   If File.Exists(File.DirDefaultExternal, "1.txt") = True Then 'should be False ?????????
     File.Copy(File.DirAssets, "1.txt", File.DirDefaultExternal, "1.txt")
     File.Copy(File.DirAssets, "2.txt", File.DirDefaultExternal, "2.txt")
   End If
End If
 
Upvote 0

anOparator

Active Member
Licensed User
Longtime User
the intended .zip had 2 pages, this one has 1.
Had too many projects open.
Am trying to add multiple scrolling pages.
This zip does not scroll but saves edits, how to do the same with multiple pages is where I need pointers.
thanks
 
Last edited:
Upvote 0

anOparator

Active Member
Licensed User
Longtime User
the project scaled down.
3 pages can be edited, when I try adding a Scrollview the Labels disappear.
How to add Scrollview?
thanks
 

Attachments

  • tmp_tabStripScroll42635851.zip
    112.6 KB · Views: 160
Upvote 0

anOparator

Active Member
Licensed User
Longtime User
Ok, now I’m declaring Scrollview in Designer and scrolling using
B4X:
 ‘ScrollView.Panel.AddView(...)’
Thanks for the docs.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
	TabStrip1.LoadLayout("Page1", ".")
	TabStrip1.LoadLayout("Page2", ".")
	TabStrip1.LoadLayout("Page3", ".")
	TabStrip1.LoadLayout("Page4", ".")

	lblBdy1.RemoveView()
	lblBdy2.RemoveView()
	ScrollView1.Panel.AddView(lblBdy1, 10dip, 10dip, 490dip, 800dip)
	ScrollView2.Panel.AddView(lblBdy2, 10dip, 10dip, 490dip, 800dip)
 
Upvote 0
Top