Skip to content
Shanti Ranjan Das edited this page Jan 24, 2020 · 7 revisions

Android Extensions(Andy)

A library build with love for developers

This library is created for fast development. We all use helper classes and libraries for every project somehow. This is just that so you can focus more on your actual logic. I have tried to make it less dependent on other libraries. Feel free to take the piece of code you like or the complete or you can contribute.


Andy
This object holds the default configuration for some fields

  • disposeAllLogs(isDisposable: Boolean = false)
    Dispose all logs, means all logs are now not be printed, this is false by default, make it true. Especially before going to production(It will not show any logs)

Note:It will only dispose those logs which are printed using this library's log extension function(like loge,logd,logw). For more details see documentation of LogUtils class

  • doubleClickDuration(duration:Long)
    Set default duration of double click, default is set to 1000L i.e., 1 sec. This method is used with canClickAgain() method. See the method description for more details.

ConstantUtils
This object holds constant variables which we mainly use like name regex, email regex and much more. See the class for more details

DateUtils
This object holds constant variables which we mainly used for time. See the class for more details

LazyRecyclerAdapter
This abstract class is responsible for lazy loading of data in Recyclerview, you have to provide 2 views for it. 1 is for data and 2nd is for lazy loading. Attach LazyLoadRecyclerCallback interface by calling addLazyLoadCallback to get notified by onLoadMore method when Recyclerview scroll to end. If you don't want to load more data when Recyclerview scroll to ends, just simply call canLazyLoadAgain and pass false to it. Please see the sample class for more detail, or your can just see the class directly.

RecyclerAdapter
This abstract class is responsible for loading of data in Recyclerview. It's just a simple recyclerview class. Where you have to provide view for binding.

PermissionManager
This class is responsible for handling permissions in android(upto version 28). You can see the class description in the class itself.

Clone this wiki locally