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

basic vue support for listview #7

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

farfromrefug
Copy link
Collaborator

It's far from optimized.
Your listview code is based on tns listview code which is not optimized for recyclerview/adapter.
In case of view (and maybe angular too), the onCreateViewHolder and onBindViewHolder are not optimized.
If you want you can take look at what i did on nativescript-collectionview here

But at list for me this makes it work with Vue

@bradmartin
Copy link
Owner

Thanks @farfromrefug 🎉

@bradmartin bradmartin merged commit 802dc40 into bradmartin:master Apr 4, 2019
@farfromrefug farfromrefug deleted the listview_vue branch April 4, 2019 14:44
@farfromrefug
Copy link
Collaborator Author

@bradmartin BTW i though about it. Instead of rewriting a full listview (using recycler) again. Maybe you could just add nativescript-collectionview as a dependency and just extend its createNativeView?
I could make any change necessary to it.

@bradmartin
Copy link
Owner

@farfromrefug - Might work. Not sure.

Need some Wearable specifics to replace current one in this plugin.

Mainly: https://github.com/bradmartin/nativescript-wear-os/blob/master/src/packages/listview/tns-custom-scrolling-layout-callback.ts so the listview will work on circular watch faces. I need to optimize the code for that so the items hug the screen edge closer on the left (see #6).

@farfromrefug
Copy link
Collaborator Author

@bradmartin easily done:

  • extend CollectionView
  • override createNativeView to create wearOs ListView
  • override initNativeView to apply everything related like you do.

Mainly it will drop your code significantly. Also right now you are not snapshot compatible. Except from the Callback code, it would fix it

@bradmartin
Copy link
Owner

Awesome. I'm open to it as long as it allows me to modify things without having to depend heavily on the dependency in case I can't reach you 😄

Would you want to work on the PR? I would, but I'm probably 6 weeks out from having time to do any updates that aren't critical for work at the moment.

@bradmartin
Copy link
Owner

As long as the recycler works normally on square watches and then has the scaling circular option for circle watch faces, then I like the idea of reusing what you have. The circle watch face support is my main focus right now and getting #6 taken care of in the next week or two.

@farfromrefug
Copy link
Collaborator Author

@bradmartin you will be able to override everything!
I ll make a PR when i have the time. I am also about to work more on watches.

@bradmartin
Copy link
Owner

Also, apologies if I've broken the plugin along the way. Had no idea anyone was actually using it right now 😄 so I've been really loose with development. I'll be more cautious going forward knowing it's not just me playing around with it.

@farfromrefug
Copy link
Collaborator Author

@bradmartin i just started using it fore the rounded watch listview. Will try to contribute more. BTW, maybe you could add me as a contributor? Could create beta version to test from branch and then you could merge in master. Would make things a bit faster

@bradmartin
Copy link
Owner

Done 👍

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.

2 participants