Click here to Skip to main content
14,426,057 members
   

Android

 
QuestionMessage Closed Pin
1-Jan-20 21:56
MemberNayan_Rathod1-Jan-20 21:56 
QuestionGlobalization issues with Dates Pin
Vimalsoft(Pty) Ltd29-Dec-19 11:17
professionalVimalsoft(Pty) Ltd29-Dec-19 11:17 
AnswerRe: Globalization issues with Dates Pin
Eddy Vluggen29-Dec-19 13:05
mveEddy Vluggen29-Dec-19 13:05 
AnswerRe: Globalization issues with Dates Pin
Richard MacCutchan30-Dec-19 1:09
communityengineerRichard MacCutchan30-Dec-19 1:09 
GeneralRe: Globalization issues with Dates Pin
Vimalsoft(Pty) Ltd30-Dec-19 8:35
professionalVimalsoft(Pty) Ltd30-Dec-19 8:35 
SuggestionRe: Globalization issues with Dates Pin
Richard Deeming7-Jan-20 10:16
communityengineerRichard Deeming7-Jan-20 10:16 
QuestionFirebase infinite scroll list view Load 10 items on Scrolling using firebase realtime database "Android Project" Pin
lucas houmga19-Dec-19 23:47
Memberlucas houmga19-Dec-19 23:47 
I'm looking for a way to implement a simple list view scrolling in my Firebase app, but I am not getting any way out how to implement this. I have already tried 2-3 tutorials and documentation available on the Internet, but didn't the required result.

In my app I want scrolling like at starting first 10 list items load then each time on scrolling next 10 or 20 items will load until the last item appears at the bottom of the list.

So I tried retrieving first 10 items the following way :



<pre>private void readsposts(){

        DatabaseReference reference = FirebaseDatabase.getInstance().getReference();
        reference.keepSynced(true);

        reference.child("Posts")
                .limitToLast(10)
                .addValueEventListener(new ValueEventListener() {
                    @Override
                    public void onDataChange(DataSnapshot dataSnapshot) {
                       
                        postList.clear();
                        for(DataSnapshot snapshot:dataSnapshot.getChildren()){
                            Post post = snapshot.getValue(Post.class);
                            for(String id:followingList){

                                if(post.getPublisher()!=null && post.getPublisher().equals(id)){

                                    postList.add(post);
                                   

                                }

                            }

                            if(post.getPublisher()!=null && post.getPublisher().equals(firebaseUser.getUid())){
                                postList.add(post);

                            }

                            postAdapter.notifyDataSetChanged();


                        }
                        
                        mProgressBar.setVisibility(RecyclerView.GONE);

                    }


                    @Override public void onCancelled(DatabaseError databaseError) {
                        mProgressBar.setVisibility(RecyclerView.GONE);
                    }
                });
    }




In the above code, as you can see I am generating Log to check if data is fetched from the firebase, but I got no output Android monitor.
I have no idea how can I implement Firebase Scrolling in my Recycler view. I think this is a common problem for those who implement infinite-scroll in recycler view/ list view.
Could you please help me implementing this feature. Thanks.
QuestionHelp me with this simple app. Pin
All Matter25-Nov-19 9:02
MemberAll Matter25-Nov-19 9:02 
SuggestionRe: Help me with this simple app. Pin
David Crow30-Nov-19 5:33
MemberDavid Crow30-Nov-19 5:33 
QuestionUnmanaged library exception handling Pin
wakeup4425-Nov-19 0:01
Memberwakeup4425-Nov-19 0:01 
QuestionMessage Closed Pin
24-Nov-19 17:25
MemberMember 1465011024-Nov-19 17:25 
QuestionMessage Closed Pin
19-Nov-19 20:10
professionalandreelew9219-Nov-19 20:10 
QuestionMessage Closed Pin
19-Nov-19 20:10
professionalandreelew9219-Nov-19 20:10 
QuestionAre BroadcastReciever and ContentObserver killed If Started From Service? Pin
Django_Untaken27-Oct-19 20:15
MemberDjango_Untaken27-Oct-19 20:15 
AnswerRe: Are BroadcastReciever and ContentObserver killed If Started From Service? Pin
Richard MacCutchan27-Oct-19 23:21
communityengineerRichard MacCutchan27-Oct-19 23:21 
QuestionDo you believe that Kotlin will become more popular than Java? Pin
Darina Smartym15-Oct-19 23:28
MemberDarina Smartym15-Oct-19 23:28 
AnswerRe: Do you believe that Kotlin will become more popular than Java? Pin
Afzaal Ahmad Zeeshan28-Oct-19 2:02
mvaAfzaal Ahmad Zeeshan28-Oct-19 2:02 
Questionattach .jar file to already running apk in emulator Pin
Member 1457084310-Oct-19 7:41
MemberMember 1457084310-Oct-19 7:41 
AnswerRe: attach .jar file to already running apk in emulator Pin
Richard MacCutchan10-Oct-19 23:10
communityengineerRichard MacCutchan10-Oct-19 23:10 
GeneralRe: attach .jar file to already running apk in emulator Pin
Member 1457084311-Oct-19 1:11
MemberMember 1457084311-Oct-19 1:11 
GeneralRe: attach .jar file to already running apk in emulator Pin
Richard MacCutchan11-Oct-19 1:53
communityengineerRichard MacCutchan11-Oct-19 1:53 
AnswerRe: attach .jar file to already running apk in emulator Pin
Leanbridge Technologies21-Nov-19 20:48
professionalLeanbridge Technologies21-Nov-19 20:48 
QuestionNullPointerException When Setting ClickListener on a RelativeLayout Pin
Django_Untaken12-Sep-19 1:52
MemberDjango_Untaken12-Sep-19 1:52 
AnswerRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
Richard MacCutchan12-Sep-19 2:40
communityengineerRichard MacCutchan12-Sep-19 2:40 
GeneralRe: NullPointerException When Setting ClickListener on a RelativeLayout Pin
Django_Untaken12-Sep-19 2:44
MemberDjango_Untaken12-Sep-19 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.