All Projects → nrohmen → Firestorerecycleradaptersample

nrohmen / Firestorerecycleradaptersample

Sample Android project using FirestoreRecyclerAdapter

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Firestorerecycleradaptersample

Paginate firestore
A flutter package to simplify pagination with firestore data 🗃
Stars: ✭ 40 (-6.98%)
Mutual labels:  firebase, firestore
Recyclerviewtest
RecyclerView 实践学习的demo,其中有基本的列表,表格,瀑布流,进阶的,等等
Stars: ✭ 23 (-46.51%)
Mutual labels:  recyclerview, recyclerview-adapter
Thenetwork Open
TheNetwork is a blog cum chat app. It's completely built using firebase. Users can post, comment, like and bookmark the blogs, also users can send follow requests to connect with people. Users can create events and also prepare an event roadmap. Pagination for realtime data is also included in chats, blogs and events.
Stars: ✭ 17 (-60.47%)
Mutual labels:  firebase, firestore
Lastadapter
Don't write a RecyclerView adapter again. Not even a ViewHolder!
Stars: ✭ 777 (+1706.98%)
Mutual labels:  recyclerview, recyclerview-adapter
Flagchatadapter
FlagChatAdapter is easy to implement enchanting recycler view adapter. Just extend your adapter with FlagChatAdapter, impliment some methods and voila! You have got the most beautiful looking chat on your phone. Zero boilerplate code, just put your variables in the right direction.
Stars: ✭ 39 (-9.3%)
Mutual labels:  recyclerview, recyclerview-adapter
Multiviewadapter
Easily create complex recyclerview adapters in android
Stars: ✭ 801 (+1762.79%)
Mutual labels:  recyclerview, recyclerview-adapter
Greet
Greet is a simple social network for Android written using Firebase Cloud Firestore and Cloud Functions
Stars: ✭ 23 (-46.51%)
Mutual labels:  firebase, firestore
Emberfire
The officially supported adapter for using Firebase with Ember
Stars: ✭ 689 (+1502.33%)
Mutual labels:  firebase, firestore
Travelmantics
Firestore & firebase storage MVVM sample
Stars: ✭ 28 (-34.88%)
Mutual labels:  firebase, firestore
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-65.12%)
Mutual labels:  recyclerview, recyclerview-adapter
Social Note
Social Note - Note-taking, sharing, time & location reminder
Stars: ✭ 38 (-11.63%)
Mutual labels:  firebase, firestore
Retrofit Recyclervew
An implementation of a RecyclerView using Retrofit and Glide to create a movie list
Stars: ✭ 40 (-6.98%)
Mutual labels:  recyclerview, recyclerview-adapter
Wild Workouts Go Ddd Example
Complete application to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring of a Go project.
Stars: ✭ 756 (+1658.14%)
Mutual labels:  firebase, firestore
Expandablerecyclerview
A very simple example of how the expandable RecyclerView can be implemented
Stars: ✭ 16 (-62.79%)
Mutual labels:  recyclerview, recyclerview-adapter
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+1639.53%)
Mutual labels:  recyclerview, recyclerview-adapter
Fsfirestore
Functional F# library to access Firestore database hosted on Google Cloud Platform (GCP) or Firebase.
Stars: ✭ 22 (-48.84%)
Mutual labels:  firebase, firestore
Easyxrecyclerview
主要提供了简单易用强大的RecyclerView库,包括自定义刷新加载效果、极简通用的万能适配器Adapter、万能分割线、多种分组效果、常见状态页面、item动画效果、添加多个header和footer、侧滑、拖拽、Sticky(黏性)效果、多item布局等,各模块之间灵活、解耦、通用、又能相互组合使用。
Stars: ✭ 607 (+1311.63%)
Mutual labels:  recyclerview, recyclerview-adapter
Zoomrecylerlayout
🎢 Zoom Recycler Layout Manager For Android Kotlin
Stars: ✭ 618 (+1337.21%)
Mutual labels:  recyclerview, recyclerview-adapter
Hoverboard
Conference website template
Stars: ✭ 935 (+2074.42%)
Mutual labels:  firebase, firestore
Firextensions
[DEPRECATED] 🔥 Unofficial Kotlin Extensions for the Firebase Android SDK.
Stars: ✭ 30 (-30.23%)
Mutual labels:  firebase, firestore

FirestoreRecyclerAdapterSample

Sample Android project using FirestoreRecyclerAdapter. This project is using Firebase Cloud Firestore as a databases.

Using FirestoreRecyclerAdapter to populate RecyclerView

Before you create the create the project in Android Studio, you should:

  1. Create a Firebase Project here.
  2. Go to Database menu and choose Cloud Firestore.
  3. Add Collection named "friends".
  4. In the "firends" collection, add some documents with some field (name, image, title, company) in the each documents. Also you should integrate the Firebase project with the project that will you create in Android Studio. For more information, go to the Firebase Docs.

Dependencies

Some dependencies thats should be implemented in your project:

implementation "com.google.firebase:firebase-firestore:11.4.2"
implementation "com.firebaseui:firebase-ui-auth:3.0.0"
implementation "com.firebaseui:firebase-ui-firestore:3.0.0"

Query

To retrive all documents in the collection use:

Query query = db.collection("friends");

Using FirestoreRecyclerAdapter

Configure the adapter by building FirestoreRecyclerOptions:

 FirestoreRecyclerOptions<FriendsResponse> response = new FirestoreRecyclerOptions.Builder<FriendsResponse>()
                .setQuery(query, FriendsResponse.class)
                .build();

Create FirestoreRecyclerAdapter:

 FirestoreRecyclerAdapter adapter = new FirestoreRecyclerAdapter<FriendsResponse, FriendsHolder>(response) {
            @Override
            public void onBindViewHolder(FriendsHolder holder, int position, FriendsResponse model) {
                progressBar.setVisibility(View.GONE);
                holder.textName.setText(model.getName());
                holder.textTitle.setText(model.getTitle());
                holder.textCompany.setText(model.getCompany());
                Glide.with(getApplicationContext())
                        .load(model.getImage())
                        .into(holder.imageView);

                holder.itemView.setOnClickListener(v -> {
                    Snackbar.make(friendList, model.getName()+", "+model.getTitle()+" at "+model.getCompany(), Snackbar.LENGTH_LONG)
                            .setAction("Action", null).show();
                });
            }

            @Override
            public FriendsHolder onCreateViewHolder(ViewGroup group, int i) {
                View view = LayoutInflater.from(group.getContext())
                        .inflate(R.layout.list_item, group, false);

                return new FriendsHolder(view);
            }

            @Override
            public void onError(FirebaseFirestoreException e) {
                Log.e("error", e.getMessage());
            }
        };
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].