Image generated by Midjourney

What’s up Corbind! Release 1.7.0 🎉. It’s been a long road.

Vladimir Raupov
4 min readFeb 17, 2023

--

It’s amazing to realize that more than three years have passed since the first release of Corbind. Equally amazing is that I still find things to add in the next release.

Today I will answer the question of what has changed in Corbind since the first release, what’s new in the latest release 1.7.0 🎉, and what the plans are for the future. But first things first.

What’s new?

Several new modules and events have appeared in the project:

Activity module (corbind-activity):

  • OnBackPressedDispatcher.backPresses, called when OnBackPressedDispatcher.onBackPressed triggered.

Fragment module (corbind-fragment):

  • FragmentManager.resultEvents, called when any results set by setFragmentResult using the same requestKey.

Lifecycle module (corbind-lifecycle):

  • Lifecycle.events, called when any lifecycle event change.

Navigation module (corbind-navigation):

  • NavController.destinationChanges and NavController.destinationChangeEvents, called when the NavController destination or its arguments change.

ViewPager2 module (corbind-viewpager2):

The support for ViewPager2 was a natural choice. The set of events is very similar to ViewPager, but they are based on a different callback:

  • ViewPager2.pageScrollEvents, called when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll.
  • ViewPager2.pageScrollStateChanges, called when the scroll state changes.
  • ViewPager2.pageSelections, called when a new page becomes selected.

The old modules are also supplemented with new events:

Corbind (corbind):

  • Context.receivesBroadcast, called with any broadcast Intent that matches filter.
  • CalendarView.dateChangeEvents, called upon change of the selected day.
  • TimePicker.timeChangeEvents, called when time has been adjusted.

Material (corbind-material):

  • MaterialDatePicker.dismisses, called whenever the date picker is dismissed, no matter how it is dismissed.
  • MaterialTimePicker.positiveClicks, called when the user confirms a valid selection of the time.
  • NavigationBarView.itemReselections, called when the currently selected navigation item is reselected.
  • Slider.valueChanges, called a slider's value is changed.
  • ChipGroup.checkedChanges, called when the checked chips are changed.

And this is just a small part of the events that were added to the project. For convenience, the README of each module contains a table with a list of events.

What’s new in version 1.7.0?

New components have become available in Material 1.8.0, and Corbind has already added events for them.

Search Bar. Provides an implementation of the floating search field:

  • SearchBar.navigationClicks, called whenever the user clicks the navigation button at the start of the searchbar.

Search View. Provides an implementation of a full-screen search:

  • SearchView.transitionStateChanges and SearchView.transitionStateChangeEvents, called when the given SearchView’s transition state has changed.

Side Sheet. Surfaces containing supplementary content that are anchored to the side of the screen:

  • SideSheetBehavior.sideSheetSlides, called when the side sheet is being dragged.
  • SideSheetBehavior.sideSheetStateChanges, called when the side sheet changes its state.

Also, I was asked to add the previously missed event for HideBottomViewOnScrollBehavior:

  • HideBottomViewOnScrollBehavior.bottomViewScrollStateChanges, called when the bottom view changes its scrolled state.

Some of your questions

Are Actor and Channel still needed in the project?

I think so, and there are several reasons for that:

  1. It’s not difficult to maintain them 😁.
  2. These are still good tools and they worked great even before the release of Flow.
  3. Several teams from China and Europe asked me to keep Actor and Channel, as they actively use them.

That’s enough for me to continue supporting them.

Will there be a Roadmap?

The project is currently at a stage where it doesn’t require long-term plans. It is much more important to quickly add new events, which can happen now or tomorrow or in a month.

What are the ways to support the project?

Just use the project 😁.

What’s next?

There are plans to write a series of short articles with more practical examples of using Corbind in Android applications. After all, the main strength of events is not in the events themselves, but in the ability to combine and merge them, thereby gaining greater control.

Conclusion

At the moment, I can confidently say that the project covers 95% of all events that are most commonly used by Android developers, and this value is only increasing.

At any time in the next alpha or beta version of Material, I’ll notice a new UI component or new events or one of you will come up with a good idea, and I’ll get to work.

I am grateful to everyone who helps develop the project, points out possibilities and mistakes.

Well, that’s all for today. Write good code and have fun! Bye!

--

--