Skip to content
Gallery app using RecyclerView + Toast + Snackbar
Swift Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Automated Source Code Transformation service
Re-cycle / Re-use / Re-purpose

Platform - Android | iOS Follow @reflectcode

Gallery Demo

This project demonstrates the conversion of Gallery demo. RecyclerView is ported to UICollectionView. Along with this this project also shows how android Toast, Snackbar and android resource class gets ported to iOS.

This repository contains the Android source code which was used as input and generated iOS source code project.

Class Package
Toast android.widget.Toast
ArrayList java.util.ArrayList
R Resources

Statement Estimation

File Statement 16 67 90
activity_main.xml 393
cell_layout.xml 249
Resource xml 48
Images 120
Total 1437

Dev Notes

  • RecyclerView - The RecyclerView on iOS is ported to 'UICollectionView' is used. The 'cell_layout.xml' from android project is ported to xib file and used as layout for the 'UICollectionViewCell'. To handle button tap event addTarget() is used. UILabel and UIImageView do not have addTarget(), for these controls 'UITapGestureRecognizer' is assigned.

  • Snackbar - We were not able to identify suitable library which provides this functionality. Therefore swift implementation of android 'Snackbar' control is provided using custom lib 'RC_Snackbar.swift' developed by ReflectCode.

  • Toast - Swift implementation of android 'Toast' control is provided using custom lib 'RC_toast.swift' developed by ReflectCode.

  • Resources - During compilation Android creates providing good type-safety. Taking inspiration from R.swift lib, RC generates 'R.swift' file which provide type-safe access to all the resources. To access the resources 'RC_GetResources.swift' provides various methods which are inlined with android 'Resources' class.

Credits for Android project -

Screen shots






This project is made available under the MIT license. See the LICENSE file for more details.

You can’t perform that action at this time.