Skip to content

Releases: skydoves/Bundler

1.0.4

20 Mar 11:04
11bb6eb
Compare
Choose a tag to compare

🎉 Released a new version 1.0.4! 🎉

What's New?

  • Added bundleValue for retrieving intent & arguments extra values immediately from Activity and Fragment.
    bundleValue, bundleNonNullValue, bundleArrayValue, bundleArrayListValue.
val id = bundleValue("id", 100L)
val name = bundleValue("name", "")
val poster = bundleValue<Poster>("poster")
  • Now observeBundle emits data only a single time to a single observer. We can observe only once using one observer. And the observer will be unregistered from the LiveData after observing data at once.

1.0.3

30 Nov 15:56
19c7ed8
Compare
Choose a tag to compare

🎉 Released a new version 1.0.3! 🎉

What's New?

  • Added new expressions bundleNonNull and observeBundle.

bundleNonNull

The bundle expression for initializing objects (e.g. Bundle, CharSequence, Parcelable, Serializable, Arrays), the property type must be null-able. But If we want to initialize them non-nullable type, we can initialize them to non-nullable type using the bundleNonNull expression.

- val poster: Poster? by bundle("poster")
+ val poster: Poster by bundleNotNull("poster")

observeBundle

We can observe the bundle data as LiveData using the observeBundle expression.

If there are no extra & arguments in the Activity or Fragment, null will be passed to the observers.

private val id: LiveData<Long> by observeBundle("id", -1L)
private val poster: LiveData<Poster> by observeBundle("poster")

id.observe(this) {
  vm.id = it
}

poster.observe(this) {
  binding.name = it.name
}

1.0.2

06 Nov 17:13
03f3b35
Compare
Choose a tag to compare

🎉 Released a new version 1.0.2! 🎉

What's New?

  • Add an infix eq method to add extras without need of + (#2)
  • Fix type miss matching for the CharSequence. (d491110)
  • Make initialize lazily with an unsafe lazy mode to bundle expressions. (7a3021f)
  • Added ActivityBundler and FragmentBundler for creating an instance of the Bundler and initializing the extras data & arguments.

1.0.1

01 Nov 11:33
e7f841f
Compare
Choose a tag to compare

🎉 Released a new version 1.0.1! 🎉

What's New?

  • Change intent function extensions to use reified type instead of KClass. (#1)
  • Renamed intent to intentOf and the intent extensions are deprecated.
  • Added missing documentation.

1.0.0

31 Oct 14:02
bbb7f1b
Compare
Choose a tag to compare

🎉 Released a new version 1.0.0! 🎉