Closed sbotev5 closed 5 years ago
What exactly doesn't work in a Fragment? Some screenshots or logs would be really helpful! As it stands there's a lot of code here so it's hard to know where to start.
On Sun, Mar 3, 2019, 10:28 AM sbotev5 notifications@github.com wrote:
Fragment logic transferred on an Activity class works fine. This is weird.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/firebase/FirebaseUI-Android/issues/1593#issuecomment-469049904, or mute the thread https://github.com/notifications/unsubscribe-auth/AIEw6nnleANWPmsR3nL_0_IdxeNVFjrfks5vTBROgaJpZM4bahcc .
Apologies everyone.
The problem is in MessagesFragment.java
I call adapter.startListening in onStop and stopListening in onStart. Should be vice versa.
what was the problem ? did you solved it ? How?
I am having the same problem and my listeners are fine
I am having the same problem and my listeners are fine, Everything seems fine, I can run the same query and it runs fine but FirebaseUI's "onBindViewHolder" is never called for some odd reason, I have log in there , it is never called. My my listeners are alse fine.
I want to use a RecyclerView inside a Fragment but it doesn't seem to be working. The query works (it gives the documents) and I have used almost the same code in an Activity - not sure why this doesn't work.
I want to display messages associated with a "tenancy" in my Recycler view:
Message.java getters and setters omitted. `public class Message { private String content; @ServerTimestamp private Timestamp timestamp; private String from;
` MessageAdapter.java
`public class MessageAdapter extends FirestoreRecyclerAdapter<Message, MessageAdapter.MessageHolder> {
}`
MessagesFragment.java
`public class MessagesFragment extends Fragment {
}`
fragment_messages.xml
`<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/icons">
</android.support.constraint.ConstraintLayout>`
message_row.xml
`<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content">
</android.support.constraint.ConstraintLayout>`
Thanks in advance for any help.
Regards,
sbotev5