bradmartin / nativescript-wear-os

Consolidated repo for WearOS with NativeScript
Apache License 2.0
34 stars 7 forks source link

basic vue support for listview #7

Closed farfromrefug closed 5 years ago

farfromrefug commented 5 years ago

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 commented 5 years ago

Thanks @farfromrefug 🎉

farfromrefug commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@bradmartin easily done:

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

Done 👍