The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
DataBindingObservableImpl
now accepts optional PropertyChangeRegistry argument. This can be useful if usage class chooses to have some fields that are not implemented viaby observable
.
Joda
dependency is now optional. If it is not found in classpathsetFastJodaTimeZoneProvider
fromSecretSauceSettings
will be ignored.- Migrate to androidX
-
DataBindingObservableImpl
now hasobservable
function that accepts callback to be called after the value has been changed. This callback receives both old and new value of the field. -
AttachableViewModelRx.disposeOnDetach
now returnsDisposable
to allow for further chaining. -
getViewModelWithAutoLifecycle
andFragment.getVMWithAutoLifecycle
now exposesrecursive
parameter (needed fe: when using with Android Navigation Architecture Component, or when we attach to DialogFragment)
-
DataBindingObservableImpl
now only notifies callbacks only if new value is different from the old one. -
subscribeTillDetach
/observableCallback
for objects that are Observable (and supposedly have multiple fields) now requires passingBR
fields IDs. Only when one of fields with matching ID (or 0) is changed then callback will be called -
useFragmentViewModelProvider
default value changed - ViewModels requested by Fragments will now use Fragment lifecycle by default. If you want to change to previous behaviour you can set flag globally in [SecretSauceSettings]. -
RxJava2
dependency is now marked asimplementation
to avoid adding it as a transitive dependency to project that don't need it. NOTE: you must have RxJava in classpath to useAttachableViewModelRx
-
Bump dependencies
- Binding Adapter -
srcId
callssetImageResource
ActivityLifecycleCallbacksAdapter
- adapter forApplication.ActivityLifecycleCallbacks
were methods does nothing. Allows to override just one method instead of implementing whole interface -Activity.registerLifecycleCallbacksForThisActivityOnly
- Wraps given [Application.ActivityLifecycleCallbacks], so only lifecycle of [this] [Activity] are forwarded. Allows to avoidif (a === view)
boilerplateAttachableViewModelRx
- AttachableViewModel with convenience extension functions that will dispose RX Disposable on detach. This ViewModel also allows similar register/unregister action for Android DataBinding.DataBindingHelper
- aliases for easier creation of callback of new values inObservableBoolean
andObservableField
DataBindingObservable
/DataBindingObservableImpl
- allows for easier creation of Observable classes.
- lifecycle extensions functions moved from
com.byoutline.secretsauce.di
tocom.byoutline.secretsauce.lifecycle
package lazyViewModelWithAutoLifecycle
/getViewModel
now has default value forview
parameter. If not specified differently this will try to castthis
toview
, which is commonly the case for fragment and activities.AttachableViewModel
now allows registering multiple detach actions viaregisterDetachAction
(s) method instead of allowing only one. Passing detach action assuper.onAttach
param is no longer supported.- Calling function that requires
containerViewId
orbrViewModelId
without passing it as an argument, or registering it globally in [SecretSauceSettings] will now throw an exception.
ViewModelAutoLifecycle
and extensions functions added.- Rx Java
invokeOnStopped
extension functions for Fragment and Activity.
- Converted to Kotlin.
- due to vast changes artifact name changed from
secretsauce
tosecretsaucekt
. Settings
renamed toSecretSauceSettings
to make it more obvious in application what is being set.NetworkChangeReceiver
- now sets state inObservableBoolean
instead of posting toOtto
bus.- toast helpers are now
Context
extension functions.
- Otto Bus
BaseAppCompatActivity
removed - use Kotlin extension functions fromcom.byoutline.secretsauce.activities
instead.WaitDialog
removed - useWaitLayout
or other non blocking progress indicator.DatePickerFragment
removed - creating DatePicker without libs is now easier then before, so there was no longer much to gain by using this implementation.FontCache
/Custom font views removed - Android now has native support for Fonts.SharedPrefsLoaderAsyncTask
- with Kolin/lambda support in new Android build tools it is not worth wrapping so small amount in code in lib.- Common events removed - everything Otto related was dropped, use Databinding/RxJava instead.
BaseApp
removed - initialization is now needed only for showFragment, Toast and logs, and can be done viaSettings.set(debug = BuildConfig.DEBUG, containerViewId = R.id.container)
.ss_drawer_shadow
drawables removed.
- Make listener interface in
CustomClickableSpan
public. CustomFontTextView
now checkssuffixSpace
attribute that can be used to workaround wrong measurement onwrap_content
when font is italic.
- Bump dependencies.
- Implementing
NavigationDrawerFragment.NavigationDrawerCallbacks
is now optional forBaseAppCompatActivity
.
- Deprecated activities.
- Methods for showing non support fragments removed from
BaseAppCompatActivity
. - Support for
WaitDialog
removed fromBaseAppCompatActivity
. UseWaitDialogHandler
in your activity if you need it.
getContainerId
andgetDefaultFontName
moved fromBaseApp
toAppComponentInterface
.
@Named(BaseApp.INJECT_NAME_SESSION_ID)
replaced with@SessionId
.CheckableFrameLayout
andChackableLinearLayout
updated to pass real view instead of null.ViewUtils.getStyledText
added that allows applying multiple customizations at once.appcompat
dependencies bump.
kotlin
(added in 0.4.8) removed from project- Accidental dependency on
retrofit
removed - decreased method count.
- Added
kotlin
dependency. (Removed in [0.4.9])
- Changed
MenuOption
from concrete class to interface. - Make
NavigationDrawerFragment::selectItem
public.
- Added no args
CachedField
support toWaitLayout
. - Added
setStyledMsg
toViewUtils
that allow to set style for part of text inTextView
.