Objectives of This Tutorial
- We would be creating the swipe view as used in the Tinder. Swipe right is considered accepted and swipe left is rejected.
- 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.
- We will load the images from urls and set it in the view display. For this purpose, we will use a library Glide.
- The profile data list will be seeded in the application and this seed json file will be stored in the assets folder.
- The seed file will be parsed into Profile object using another library gson.
- This structure will also be compatible if we are pulling url json data from a live server.
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.