-
Notifications
You must be signed in to change notification settings - Fork 548
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
Documentation and examples suggestions #120
Comments
Hi @Voyz, what a long message :-) it means that you really want to help, I appreciate it. Before I reply on the single points, please keep in mind that, in general, I had few time in the previous months, but I will try to modify the demo App, to make the code clearer to understand also for a newbie in Android. However, all these changes will take some months, because I am the only one working on it. Consider that 4 months ago the demo app was only a single activity. Then, lib grew and I decided to keep what I already had adding some fragments... I believe it is much better now. Point 1) I agree, but instead of making 2 new separated apps to maintain, install and present around, I would prefer to keep the idea of the separating the examples in the same App, maybe 2-3 activities, but this time, independent from all the rest. Point 2) I'm sorry that you commented the version 4.2 for the single selection. That part in the Wiki is well separated from 5.0 and I do not maintain it anymore. I'm focusing on the new version (I will remove 4.2 pages, when the new part is ready, I can't now). If you check better I already started to update and add the new wiki pages for version 5.0. However your remarks for the Selection Tutorial will be taken into account when I will rewrite it. Point 3-4) You will not believe but in these days I was thinking to that. Point 5) It is linked to the point 1.
As your last consideration, I would like this library becomes a central reference for the Adapter for many developers, unfortunately I have few time to dedicate and to reorganize the code in such way. However, I don't give up, a step by step I will do it. |
Hey @davideas, thanks for your reply. It all seems I've joined in to the situation in an unlucky moment of transition between 4.x and 5.x. I understand your library has grown very quick which is great, and naturally needs time to get everything documented. I'm glad you agreed with me on some points and explained some of my questions. As for particular points:
Best of luck and thanks for replying. If you come up with some simpler examples and more thorough tutorials I'd be happy to give them a test and give you feedback if you'd like that. |
@Voyz, I started to review the documentation entirely, what do you think? :-) |
@davideas Hey mate, sorry for a delay, been away for a while. The new documentation is a big step forward, well done! I'm going through Setting Up page to try out the basic implementation and I have run into some compilation problems. I think name ViewHolder is easily clashing with the RecyclerView.ViewHolder if VH generic is required to extend RecyclerView.ViewHolder, which implies following class declaration
But then, VH passed as a generic type of the Item class can not be instantiated in
which required casting MyViewHodler to VH like so
Why is MyViewHolder passed on as a generic type anyway? Wouldn't it be easier to just declare item as follows:
I've modified the wiki page to reflect these changes along with a little more information to get started. |
Hi @Voyz, thanks for the modifications, I've adapted a little, to have initialization explanation at the top. The following class declaration is wrong, that is already final for the usage: public class MyItem<VH extends MyItem.MyViewHolder> extends AbstractFlexibleItem<VH> What you have done is another user-level of Generic, you just need to have MyItem as following. Having this you don't need to cast, because VH is already defined as MyViewHolder: public class MyItem extends AbstractFlexibleItem<MyItem.MyViewHolder> |
@davideas Great! I'm glad I could help, I think the setting up page gives a clear indication on getting started |
That's really true. Since yesterday i am trying to import to my own project the instagram header sample and yet i could not finish it. I am almost giving up to trying to use this library. I just want one feature that is the header stick in recycler view, but the sample project has a lot of stuff. |
@7robertodantas, at the beginning of the review it might appear complex, Let me show you how is designed the demoApp (in the wiki there's a page dedicated to it).
For sticky headers, you need to prepare the items for Headers ( Consider always that, there are the Wiki pages + the javaDoc of the classes for each method. |
Thank you so much!! This last comment was very helpful. Although I have looked at the wiki was still a little confused by some additional complexities of the sample project. But with this simple and straightforward comment I could understand better. |
Setting Up section of the Tutorial does not provide complete code to set up project. For example, in the initializing code, the code snippet is provided without context. Thanks for reading this feedback and your work on this library. I hope to be able to use it soon! |
@searchy2, I count that, the users of this library knows how RecyclerView works, if not they should read more about it, since it is an official component of Android, not mine. |
@davideas I did not understand that this library was just an Adapter extension. I thought it was a complete RecyclerView replacement. My mistake! |
With RC2 release the Method A has been deprecated and removed from wiki The new issue #380 is open for discussion. PS. However, with RC3 I will try to simply again the examples, adding new ones and completely rewrite the demoApp, it is in the to do list, so I consider closed this issue. |
As a continuation of the conversation under this stackoverflow topic I'd like to suggest some improvements to documentation and examples.
1
2
3
4
5
6
Most importantly - I'm very positive about this project, I think it's great! Exactly because it is such a great library it is even more unlucky it lacks a good documentation. It does contain a ton of very useful code, simplifying and extending the RecyclerView. Linking the ViewHolder and the model seems like a great idea. Nonetheless, I gave up after a day of working around the example app and sparse docs to get simplest selection working, though it surely may be my deductive skills being below average.
Whilst the code seems to provide a great functionality, lack of supporting documentation may hide it from a far greater bunch of devs using it in their apps - and they should use it!
The text was updated successfully, but these errors were encountered: