Tuesday, January 31, 2023

Building Tinder Like Swipe Cards in Android

- Advertisement -

Objectives of This Tutorial

  1. We would be creating the swipe view as used in the Tinder. Swipe right is considered accepted and swipe left is rejected.
  2. As we can see in the above gif that there are a lot of stuffs happening in the scene. Gestures, animations, view integrity model, dynamic data, view management and lots more. All these are implemented in the SwipePlaceHolderView class in the PlaceHolderView library.
  3. We will load the images from urls and set it in the view display. For this purpose, we will use a library Glide.
  4. The profile data list will be seeded in the application and this seed json file will be stored in the assets folder.
  5. The seed file will be parsed into Profile object using another library gson.
  6. This structure will also be compatible if we are pulling url json data from a live server.

Card View

Card View is another major element introduced in Material Design.

Card View extends the FrameLayout and it is supported way back to Android 2. x.

A FrameLayout with a rounded corner background and shadow.

Using Card View you can represent the information in a card manner with a drop shadow (elevation) and corner radius which looks consistent across the platform.

This thread is in continuation to the Android Tinder Swipe View Example. it modifies the example codes to auto fit various screen sizes. It also fixes the issue of cards overlapping the like/dislike buttons and making them unclickable.

Aasim Sheikh
Aasim Sheikhhttps://syncsas.com/
CTO at SyncSaS Technologies

Stay in Touch

To follow the best weight loss journeys, success stories and inspirational interviews with the industry's top coaches and specialists. Start changing your life today!

Related Articles

Enable Notifications OK No thanks