B4J Question [SOLVED] [can be better] I want to create something like a timeline player...

Magma

Expert
Licensed User
Longtime User
timeline.jpg Hi there...

I am creating a project into project... i want to create a timeline player for tracked positions of different vehicles...

When i want to view the positions of one vehicle is simple but when i am having 100 of them is difficult....

So i must create a timeline in my mind comes like a big array...

So the times will go at first row measuring by second...

timeline(seconds,vehicles)
timeline(1000,101)

So at first row timerline(0,0)="00:00", timeline(0,1)="00:01"
At second and after will have vehicle/tracking record of database will just seek when needed...

So what is the best way to visualize it...?

Tableview or something else ?

I want if possible someway playing and have index with the control..

Your opinion matters..

And here is what i ve done until today:

Created Timeline Example with ScrollPane/Pane at the textfiled output the specific second/of a day (0 to 86399 - 86400 seconds/day) ---> so you can turn it in time simple...

but yet not created as control, from the other hand is doing what i want...

So here i am sharing with all you need it...
 

Attachments

  • timeline-example.zip
    6.1 KB · Views: 282
Last edited:

Cableguy

Expert
Licensed User
Longtime User
I am needing a small project to take my mind off a bigger one for a while... do you use IM?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
That grabs the line better... not crappy anymore... but can't move scrollpane automatically.. :-(


B4X:
'at globals...
    Dim x0 As Int

B4X:
'change with that
Sub lblindex_MousePressed (EventData As MouseEvent)
    x0=MainForm.WindowLeft+10dip+EventData.x
End Sub


Sub lblindex_MouseDragged (EventData As MouseEvent)
    Dim x,newx As Int
    Dim jo As JavaObject = EventData
    x = jo.RunMethod("getScreenX", Null)
   
    newx=x-x0
    If newx-ltrackwidth>= 0 Then
        lblindex.Left=newx
        stime.Value=(EventData.X-ltrackwidth)/3
    End If
   
End Sub
 
Upvote 0
Top