-
-
Notifications
You must be signed in to change notification settings - Fork 323
RecyclerView QueryAdapter + Example #72
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
Conversation
I saw that we also don't have an example for the |
@@ -3,6 +3,8 @@ apply plugin: 'android-library' | |||
dependencies { | |||
compile 'com.parse.bolts:bolts-android:1.2.1' | |||
compile 'com.android.support:support-v4:22.0.0' | |||
compile 'com.android.support:appcompat-v7:22.0.0' | |||
compile 'com.android.support:recyclerview-v7:22.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to make these provided so that they're not required if they're not using these helpers, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use provided
but it doesn't build.
Do we really want to keep the same API design as Some things that might make this design a bit better like converting |
I was thinking about keeping the API as similar as possible to the old adapter so that's easy for people to update their apps. Currently, we can't use |
- added test file - added copyright / doc - moved binding to ViewHolder - use 2 spaces for indentation
We can't use |
- use exception instead of package-private method - copyed private static method
@@ -5,6 +5,9 @@ dependencies { | |||
compile 'com.android.support:support-v4:22.0.0' | |||
compile 'com.parse:parse-android:1.10.1' | |||
|
|||
compile 'com.android.support:appcompat-v7:22.0.0' | |||
compile 'com.android.support:recyclerview-v7:22.0.0' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm... I don't like the fact that we're requiring these when developers might not be utilizing ParseQueryAdapter
... Why not leave as provided
and have the same use compile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use provided
but it didn't compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what target didn't compile? and i had a typo: why not leave this as provided
and the sample/example compile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I use provided
then connectedDebugAndroidTest
fails with java.lang.NoClassDefFoundError: com.parse.widget.ParseQueryAdapter
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add compile
dependencies to androidTest
by using androidTestCompile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using androidTestCompile
and adding androidTestCompile
and provided
, both doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hrm grab me sometime tomorrow and we can check out what's going on, but it should work with provided
and androidTestCompile
@@ -0,0 +1,612 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename as ParseQueryAdapterTest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ParseQueryAdapterTest
is used for the ListView
adapter :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could probably benefit from changing packages as well to match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then we can't use any of the package-private classes like ParseQueryController
, ParseCurrentUserController
, ParseQuery.State
, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right... nvm then
added ParseQueryRecyclerViewAdapter (similar to ParseQueryAdapter)
simple example