Ok can you make example of 150items or more in scrollview
Thanks.
Dim pHeight As Int = 125dip
I try this code and all items is half scrolled see picture attached...when i change only this code:
B4X:Dim pHeight As Int = 125dip
Scroller is working as it should be scrolling up and down goes smoth and centered...so no half ways scrolling..if i put back 250dip it scrolls half way...
I need CustomListView because i put panel to CustoListItem and in panel i have one bitmap three labels and three small bitmaps...if this is possible to add panel to ListView? ListView working scrolling as expected..there i use SelectItem And scroolls automatically...but i don't know how to add panels to ListView item...if you can write simple demo how to add panel to ListView problem will be solved....
Private Sub ScrollView1_Touch(ViewTag As Object, Action As Int, X As Float, y As Float, MotionEvent As Object) As Boolean
Log("touch...")
clvMasterCh.RemoveAt(ScrolledChannel)
clvMasterCh.InsertAt(ScrolledChannel, CreateChannelListMaster(ScrolledChannel, clvMasterCh.AsView.Width, 167dip, Channels(ScrolledChannel,3), Channels(ScrolledChannel,2), EPGs(ScrolledChannel,0), EPGs(ScrolledChannel,1).SubString2(11,16), EPGs(ScrolledChannel,2).SubString2(11,16), EPGs(ScrolledChannel,3)), 167dip, ScrolledChannel)
I added this to touch event and in log it is not called (maybe becaus ei im using remote control) can you post how to call with parameters activity_keypressup this touch event with parameters? I think that touch is not called using remote control buttons and that is why is scrolling only half.
And another question is how to update existing items in inserted panel? (I need to update labelEPG.Text = "NewText" label.EPGDesc.Text = "NewDesc")...i im calling this to remove panel and insertnew but it slow...can you write for CustomListView one Public Sub UpdatePanelItemsAt(Parameters).
If This does not suit you ... continue to use the CLV and copy all relevant code for Timer and OnTouch event to your project.
'ADDVIEW - CustomListViews
Activity.AddView(clvMasterCh.AsView, 97dip, 389dip, 407dip, 167dip)
'ADD - Master Items
For Ch = 1 To 100
clvMasterCh.Add(CreateChannelListMaster(Ch, clvMasterCh.AsView.Width, 167dip, "hayatbih.png", "Channel "&Ch, "Inspektori za životinje", "12:45", "13:10", "Na prvoj liniji: Epizoda 3 Prikazuje se život leoparda u divljini kako lovi i preživljava..."), 83.5dip, Channels)
Next
Activity.AddView(clvMasterCh.AsView, 97dip, 389dip, 407dip, 334dip)
clvMasterCh.Add(CreateChannelListMaster(Ch, clvMasterCh.AsView.Width, 334dip, "hayatbih.png", "Channel "&Ch, "Inspektori za životinje", "12:45", "13:10", "Na prvoj liniji: Epizoda 3 Prikazuje se život leoparda u divljini kako lovi i preživljava..."), 167dip, Channels)
..so the problem is how can i set CLV to 167dip and that the CLV and Panel will be equal in height 167dip
Dim pHeight as Int = 167dip 'This is used 3 times in code below ...
'@@ This sets the Scrollview Height (Viewing Window) = pHeight
Activity.AddView(clvMasterCh.AsView, 97dip, 389dip, 407dip, pHeight)
'@@ There is 2 References here .. The Last one "pHeight, Channels)" Must = pHeight
'Edit I am now confused what the first argument pHeight does ?
clvMasterCh.Add(CreateChannelListMaster(Ch, clvMasterCh.AsView.Width,pHeight, "hayatbih.png", "Channel "&Ch, "Inspektori za životinje", "12:45", "13:10", "Na prvoj liniji: Epizoda 3 Prikazuje se život leoparda u divljini kako lovi i preživljava..."), pHeight, Channels)
Here is a fresh and basic CustomListView example using Scroll Timer to center panels within the ScrollView window.so the problem is how can i set CLV to 167dip and that the CLV and Panel will be equal in height 167Dip
Another question is how can i animate only bitmap from CLV (i have SlaveCLV witch holds list of 12items) so that animate fading bottom or top like in this video (see 1:47...1:53).