LightCycle

Additional

Language
Java
Version
1.6.0 (Jan 18, 2017)
Created
Oct 2, 2014
Updated
Jul 11, 2017
Owner
SoundCloud (soundcloud)
Contributors
Jamie McDonald (jdamcd)
Matthias Käppler (mttkay)
Riccardo Ciovati (rciovati)
Fernando Cejas (android10)
michaelengland
Dorian Cussen (doridori)
vkotovv
Niko Yuwono (NikoYuwono)
Marvin Ramin (Mauin)
glung
sc-mobile-ci
jonschmidt
iluu
pchmielowski
14
Activity
Badge
Generate
Download
Source code
APK file

Commercial

LightCycle

LightCycle is an Android library that helps break logic out of Activity and Fragment classes into small, self-contained components called LightCycles.

Fields that are annotated @LightCycle and implement the LightCycle API within a LightCycleActivity or LightCycleFragment will be bound to that Activity or Fragment lifecycle.

For more information please see the website.

Examples

Build integration

Gradle:

ext.lightCycleVersion=<LATEST_VERSION>

dependencies {
  compile "com.soundcloud.lightcycle:lightcycle-lib:$lightCycleVersion"
  annotationProcessor "com.soundcloud.lightcycle:lightcycle-processor:$lightCycleVersion"
}

Or if you're using a version of the Android gradle plugin below 2.2.0

buildscript {
  dependencies {
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
  }
}

apply plugin: 'com.neenbedankt.android-apt'

ext.lightCycleVersion=<LATEST_VERSION>

dependencies {
  compile "com.soundcloud.lightcycle:lightcycle-lib:$lightCycleVersion"
  apt "com.soundcloud.lightcycle:lightcycle-processor:$lightCycleVersion"
}