-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update documentation and sample for #544 #567
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
Update documentation and sample for #544 #567
Conversation
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
…lback # Conflicts: # app/src/main/java/com/firebase/uidemo/database/ChatActivity.java # database/src/main/java/com/firebase/ui/database/FirebaseArray.java # database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java # database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
# Conflicts: # database/src/main/java/com/firebase/ui/database/FirebaseArray.java
# Conflicts: # database/src/androidTest/java/com/firebase/ui/database/TestUtils.java
# Conflicts: # database/src/androidTest/java/com/firebase/ui/database/TestUtils.java
…lback # Conflicts: # app/src/main/java/com/firebase/uidemo/database/ChatActivity.java # database/src/androidTest/java/com/firebase/ui/database/TestUtils.java # database/src/main/java/com/firebase/ui/database/FirebaseArray.java # database/src/main/java/com/firebase/ui/database/FirebaseIndexArray.java # database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java # database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
… works Change-Id: I6a62e69a58d0023c5feffb0984613e8e95be2ecc
Change-Id: Ia72a6942c947464ade5070aa07fade1e133c0f8d
Change-Id: I831fd0bae52970ff7db6f4ab1ae2fdb7aa04200a
… object, change type name to `E` in ObservableSnapshotArray to unhide type T in toArray method, remove getSnapshots(int) method from FirebaseArray since there's already get(int), use `index` instead of `newIndex` in onKeyMove in FirebaseIndexArray Signed-off-by: Alex Saveau <[email protected]>
CLAs look good, thanks! |
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX this one's next! |
…itical-#544 # Conflicts: # database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
@samtstern Merged! |
Query lastFifty = mChatRef.limitToLast(50); | ||
mAdapter = new FirebaseRecyclerAdapter<Chat, ChatHolder>( | ||
Chat.class, R.layout.message, ChatHolder.class, lastFifty) { | ||
mAdapter = new FirebaseIndexRecyclerAdapter<Chat, ChatHolder>( |
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 have a really strong preference to keeping this since I was able to find issues with the index stuff by testing with this branch.
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.
While I definitely appreciate your constant testing of the indexed bits, the purpose of ChatActivity
is to show off the basic FBUI integration, and I think FirebaseRecyclerAdapter
is the most popular. People are likely to copy and paste from this class and I want them to get the least surprising thing.
Is there somewhere else we can put the indexed code? Maybe in another Activity that's not exposed in the main chooser?
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.
@samtstern Hmmm, I didn't think about people copypasta-ing code straight from ChatActivity
... If that's the case, then I agree with you that the code should be as simple as possible and I like the idea of a separate activity for the index stuff. What do you think of 758b692?
View v, | ||
ContextMenu.ContextMenuInfo menuInfo) { | ||
menu.add("Delete") | ||
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { |
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.
Should we keep this? (I just did it for testing, but it's kinda nice)
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 like the idea but the ratio of "lines of code" to "how much it teaches you about FirebaseUI" may be too low here. If you don't have a strong preference I'd say remove it to keep ChatActivity
as short as possible.
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.
SGTM!
@SUPERCILEX thanks for merging! To be honest I have not looked at this one in many moons (was focusing on #544) so I will give it a pass in the morning. I don't expect this to take more than one round of back-and-forth before merging too, thanks for keeping this one up to date. |
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
LGTM! Gonna squash and merge. |
Awesome! |
This PR is built on top of #544 and updates documentation and the sample with the changes from #544. It should be merged only if #544 is merged.