Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Ti.UI.ListView - scroll, scrollend, dragend, dragstart events #4086

Closed
wants to merge 2 commits into from
Closed

iOS: Ti.UI.ListView - scroll, scrollend, dragend, dragstart events #4086

wants to merge 2 commits into from

Conversation

darknos
Copy link

@darknos darknos commented Apr 4, 2013

I don't know why these events were ignored in the first version of ListView (great job!), so I decided to contribute my small efforts to this great component.

I think it is quite simple to do this for Android too.

Sergey Nosenko added 2 commits April 5, 2013 00:55
scroll, scrollend, dragstart, dragend events added to Ti.UI.ListView
implementation of headerPullView copied from TiUITableView
@darknos
Copy link
Author

darknos commented Apr 5, 2013

I also added headerPullView implementation

@negupta
Copy link
Contributor

negupta commented Apr 19, 2013

I could not find a signed CLA in place. Did you sign one?

@darknos
Copy link
Author

darknos commented Apr 20, 2013

I don't know what is CLA and why it must be signed :) sorry.

@rafaelks
Copy link
Contributor

@darknos
Copy link
Author

darknos commented Apr 20, 2013

Oh... I don't have enough time for it... sorry. I created module with these events and just wanted to help Titanium guys. :)

@negupta
Copy link
Contributor

negupta commented Apr 21, 2013

Closing the pull request as the submitter has declined to sign CLA.

@negupta negupta closed this Apr 21, 2013
@negupta
Copy link
Contributor

negupta commented Apr 21, 2013

Reopening the pull request as signed CLA is available now.

@negupta negupta reopened this Apr 21, 2013
@maroofsaeed
Copy link

Hi i want to add scroll, scrollend event listeners for android listview. Anyone can help me?

@darknos
Copy link
Author

darknos commented May 22, 2013

Hi,

I can send you titanium-ui.jar with module compiled with scroll and scrolled events. just replace it with existing in 3.1.0.GA to get these events.

or you can download and compile 3.1.1 from my fork https://github.com/darknos/titanium_mobile/tree/3_1_X

Sergey Nosenko

On Wednesday, 22 May 2013 р. at 15:16, maroofsaeed wrote:

Hi i want to end scroll, scrollend event listeners for android. Anyone can help me?


Reply to this email directly or view it on GitHub (#4086 (comment)).

@maroofsaeed
Copy link

Please send me the jar file.........

@darknos
Copy link
Author

darknos commented May 22, 2013

titanium-ui.jar (http://db.tt/671nVZTZ)

Sergey Nosenko

On Wednesday, 22 May 2013 р. at 16:04, maroofsaeed wrote:

Please send me the jar file.........


Reply to this email directly or view it on GitHub (#4086 (comment)).

@maroofsaeed
Copy link

Bundle of thanks sir.

@maroofsaeed
Copy link

Sir another question, all working well regarding scroll event but if i gave the callback function like this:

listView.addEventListener('scroll', loadmore);

and in loadmore function when i am getting the values like e.totalItemCount...... its not working as saying e is undefined.

But if i add like this listView.addEventListener('scroll', function(e){
});

e is working all ok.

what is wrong with this?

@WhichKatieDid
Copy link
Contributor

@maroofsaeed What is loadmore defined as?

Also, what is the state of this pull? The submitter needs to re-merge with the main branch, for one.

@srahim
Copy link
Contributor

srahim commented Jul 1, 2013

@darknos Thank you for the Pull Request. Sorry we can not accept this PR as tableheaderview has already been implemented as pullview and we have decided not to expose the other events as its is no longer needed/ is not in the intended spec.

@srahim srahim closed this Jul 1, 2013
@darknos
Copy link
Author

darknos commented Jul 2, 2013

hmm... so can you describe how to implement lazy loading without scroll event? how to implement pull to request using table header view which is allways on the screen

@alejandrothorne
Copy link

@srahim, I'm also interested in how lazy loading/infinite scrolling will be implemented without scroll event. Can you tell us what the current plan is?

@archiepanda
Copy link

@darknos if I want to include your changes for ListView - particularly for the Scroll events for iOS, what should be the procedure? Should I just copy your version of the files to /Library/Application Support/Titanium/mobilesdk/osx/3.1.2.GA/iphone/Classes ?
Will that take care of providing scroll, scroll end, drag end, drag start events to my applications?

@contractorwolf
Copy link

I am new to Titanium development so excuse my ignorance here, but how can I get ListView scrolling events if I am using 3.1.2 GA? @darknos if you could explain it to me like I was stupid, I would appreciate it. :)

Looking through the comments makes me think that the scrolling issue has been fixed by @darknos but you guys are ignoring it for no reason? I need scroll events on ListView because it works better on android then the tableview, and I need to implement lazy-loading. What's the hold up?

@chadstachowicz
Copy link

I agree... There has to be a scroll event for ListView on android.@srahim I think you owe us an explanation or an example of code on how to accomplish this if your not going to pull this. I am actually using @darknos code in production apps because its the only way to accomplish it.

Chad

@srahim
Copy link
Contributor

srahim commented Sep 19, 2013

@chadstachowicz @contractorwolf @archiepanda @alejandrothorne @darknos

Pull Refresh has implemented in ticket TIMOB-13418 .
Sample Code.
PR relating to the fix #4407

For lazy loading we implemented a new event "marker" , where the developer can set markers at a particular point in the listview and as soon the OS starts to render view regarding the particular cell the marker event would be fired.
This feature was implemented in TIMOB-14319 .
Sample Code .
PR relating to the fix #4528

Both Features are available only on the master branch(3.2.0) right now. You can grab any recent build from the C.I page to test out this feature.

Hopefully this helps in alleviating any concerns and confusion.

I apologize for the delay in response, as we do not usually monitor closed out PR's for comment. In future, for a quicker response do create a Q&A thread.

@chadstachowicz
Copy link

@srahim thanks for this response.

My main concern is that all of the tickets referenced are for iOS, and the feature set we are concerned about is for Android. Can you please point us to the related feature sets on android?

Thanks!

Chad

@chadstachowicz
Copy link

@srahim I now see the confusion. This ticket was opened under iOS and the feature set people are worried about is Android which is what @darknos actually provided.

Maybe this will help clear up people's anxiety over why it wasn't accepted and why its needed?

Thanks!

Chad

@chadstachowicz
Copy link

@srahim This seems to be the ticket for the markers also fixed in 3.2.0 https://jira.appcelerator.org/browse/TIMOB-14320 but I can't find anything to help on pull to refresh.

Chad

@srahim
Copy link
Contributor

srahim commented Sep 19, 2013

@chadstachowicz this PR was made against iOS.

Pull to Refresh was never planned to be implemented in Android. Its a iOS only feature.

@jAddict7
Copy link

jAddict7 commented Nov 6, 2013

Am using 3.1.3.GA sdk and whether marker is not supported and saying as undefined method?. Will that work else have to use TableView for lazy loading??

@darknos
Copy link
Author

darknos commented Nov 6, 2013

https://github.com/darknos/TiAdvancedListView

This is a module based on 3.2.0 code with marker and pulldown support for guys who can’t wait for 3.2.0

in app.js

var TiAdvancedListView = require("ti.advanced.list.view”);
Ti.UI.createListView = TiAdvancedListView.createListView;
Ti.UI.createListItem = TiAdvancedListView.createListItem;
Ti.UI.createListSection = TiAdvancedListView.createListSection;

//one new feature. use following to prevent remote image loading on scroll
var listView.stopImageLoaderOnScroll = true;

Sergey Nosenko

On Wednesday, 6 November 2013 р. at 11:20, jAddict7 wrote:

Am using 3.1.3.GA sdk and whether marker is not supported and saying as undefined method?. Will that work else have to use TableView for lazy loading??


Reply to this email directly or view it on GitHub (#4086 (comment)).

@chadstachowicz
Copy link

darknos... thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet