I don't think that the ScrollingLabel suggested by Erel is what you are looking for - it is a single line view intended for a limited amount of text and I don't think that it can be synchronised with a second label, but I have not checked that. You, I think, want to display a complete book and have control of the scroll position.
You can make a label scroll by putting it inside a scrollview. If you have two scrollviews, each containing a label, then it is possible to make the second scrollview and label scroll in step with the first scrollview.
But before you do that you must solve another problem. Unless every line of the English text translates into exactly one line of the other language then the two scrolling labels will soon get out-of-step. If you are planning to put a whole book inside the label then this is certainly going to happen.
You know I have a set of vocabulary and difinition at my db and each suppose to be shown in ten item of a custemVeiw1 and their equivalents in native language in customListveiw2 at the same page I adjust the scroll and step but at my secony CustemList view my second lable that suppose to show my native language is invisible!
Sub Globals
Private CLVs As List
Private Label1 As B4XView
Private Label2 As B4XView
Private CustomListView1 As CustomListView
Private CustomListView2 As CustomListView
Type LastMovedType (CLV As CustomListView, Time As Long)
Private LastMoved As LastMovedType
End Sub
Dim i As Int
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
If File.Exists(File.DirInternal,"scrool.db") = False Then
File.Copy(File.DirAssets,"scrool.db",File.DirInternal,"scrool.db")
End If
sql.Initialize(File.DirInternal,"scrool.db",True)
Private xui As XUI
CLVs = Array(CustomListView1, CustomListView2)
For i=0 To 80
Dim v As B4XView = xui.CreatePanel("jj")
v.SetLayoutAnimated(0,0,0,100%x,40dip)
v.LoadLayout("scrool")
Label1.Text = "hhhhhhh"
CustomListView1.Add(v,"")
Next
For i=0 To 80
Dim m As B4XView = xui.CreatePanel("jj")
m.SetLayoutAnimated(0,0,0,100%x,40dip)
m.LoadLayout("scrool")
Label2.Text= "ddddd"
CustomListView2.Add(m,"")
Next
LastMoved.Initialize
End Sub
Sub CustomListView1_ScrollChanged (Offset As Int)
HandleScrollChanged(Sender, Offset)
End Sub
Sub CustomListView2_ScrollChanged (Offset As Int)
HandleScrollChanged(Sender, Offset)
End Sub
Sub HandleScrollChanged (CLV As CustomListView, offset As Int)
If LastMoved.Time + 80 < DateTime.Now Then
'new movement
LastMoved.Time = DateTime.Now
LastMoved.CLV = CLV
Else if LastMoved.CLV <> CLV Then
Return
End If
For Each c As CustomListView In CLVs
If c <> LastMoved.CLV Then
c.sv.ScrollViewOffsetY = offset
End If
Next
End Sub