Skip to content

todsdev/Kotlin-OLX-Clone

Repository files navigation

OLX Clone

Demo

  • In this application, the user is able to see ads from all the members
  • The user can add new ads to the platform, setting all his information as value, region, category, description, title and phone for contact
  • Filter the ads by region and category to find closer contacts

This application was written in Kotlin language using Android Studio. It uses Google Firebase as database, saving ads and it's information and user information in there.



Tags

Android Studio Firebase Kotlin OLX


Demo

Demo

  • Registration and Login using email and password authenticated by Google Firebase!

Demo

  • Create your personalised ad and set all the information you need for your sell!
  • Choose photos from your internal gallery to improve your ad!
  • Set up your phone number to receive direct calls and finish your sell!

Demo

  • Filter the ads by region and category to make your search easier!

Demo

  • Click in which ad you want to check for more information!
  • Call directly the registered number in the ad to make the communication easier!

Code Example

private fun recoverAdsByRegion(){
        configDialog()
        adRef = FirebaseDatabase.getInstance()
            .getReference("ads")
            .child(filterRegion)
        adRef.addValueEventListener(object: ValueEventListener{
            override fun onDataChange(snapshot: DataSnapshot) {
                adList.clear()
                for (category: DataSnapshot in snapshot.children){
                    for (ads: DataSnapshot in category.children){
                        val ad: Ad = ads.getValue(Ad::class.java)!!
                        adList.add(ad)
                    }
                }
                adList.reverse()
                adapterAd.notifyDataSetChanged()
                dialog.dismiss()
                binding.buttonRegion.text = filterRegion
            }

            override fun onCancelled(error: DatabaseError) {
                dialog.dismiss()
            }

        })
    }

Example of the code needed to recover the ads from the Google Firebase to create the exhibition in the RecyclerView, filtering all the registered information by the selected region


Libraries


Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages