Skip to content
/ kin Public

Pass values between activities in a type-safe manner.

Notifications You must be signed in to change notification settings

moomoon/kin

Repository files navigation

kin

Pass values between activities in a type-safe manner.

Usage

class A: Activity() {
  ...
  startActivity<B> {
    B::value willBe 10
  }
  ...
}

class B: Activity() {
  val value: Int by Kin.Int(defaultValue = -1)
  
  fun magicFunction() = Toast.makeText(this, "value = $value", Toast.LENGTH_SHORT).show()
}

Installation

Available via JitPack.

Step 1.

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2.

Add the dependency

	dependencies {
	        compile 'com.github.moomoon:kin:0.1'
	}

About

Pass values between activities in a type-safe manner.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published