Changelog
The version update history of
BetterAndroid
is recorded here.
Pay Attention
We will only maintain the latest dependencies, if you are using outdate dependencies, you voluntarily renounce any possibility of maintenance.
Notice
To avoid translation time consumption, Changelog will use Google Translation from Chinese to English, please refer to the original text for actual reference.
Time zone of version release date: UTC+8
ui-component
latest
1.0.5 | 2024.03.08- Removed
Factory
suffix from all extension methodkt
files - Removed deprecated files in the previous version
- Fixed the problem of incorrect subscripts and item positions returned by
onItemViewsClick
andonItemViewsLongClick
inCommonAdapterBuilder
- Adjust the entry record object added in the adapter to
LinkedHashSet
to prevent repeated additions - Open
DEFAULT_VIEW_TYPE
inRecyclerAdapterBuilder
- Added
onBindItemId
method in the adapter to customize the behavior ofgetItemId
- The adapter now allows direct use of
onBindViews
to bind item layouts without callbacks - Added
onBindHeaderView
andonBindFooterView
methods inRecyclerAdapterBuilder
- If the
trigger
method is called inOnBackPressedCallback
and is not removed, the callback event will be re-enabled
stale
1.0.4 | 2024.01.02SystemBarsController
has been fully migrated to window insets API, please refer to the documentation to start using the new usage- Reconstructed
SystemBarsController
and modified the initialization method, please refer to the documentation to get started using the new method - Window insets has been completely separated from the system bars into
WindowInsetsWrapper
,InsetsWrapper
,InsetsFactory
- Deprecated all related usages of window insets in the system bars, please start using the new window insets API now
- Reconstructed
BackPressedController
and connected it toBackPressedDispatcher
, please refer to the documentation to start using the new usage AppViewsFragment
adds a new loading layout method using the constructor method to pass inlayoutResId
- Renamed
RecyclerCosmeticMaccker
toRecyclerCosmetic
and made related functions generic - Opened preset decorators for
RecyclerView
, now you can create them manually - Refactored a lot of functions related to adapters. Now you can create them manually using the method of the same name for each adapter (
BaseAdapter
isCommonAdapter
) - Reconstructed notification related functions, please refer to the documentation to start using the new usage
- Renamed and modified some other functions
stale
1.0.3 | 2023.12.03- The
init
method ofSystemBarsController
adds thedefaultPaddings
parameter, which can configure whether to automatically add the corresponding system bars padding during initialization - When using the
show
orhide
method inSystemBarsController
, it will automatically determine whether the system bars padding has been added to determine whether to add the corresponding padding - Added
AppComponentActivity
, inherited fromComponentActivity
, applicable to Jetpack Compose without setting AppCompat theme - When using
AppBindingActivity
,AppViewsActivity
,AppComponentActivity
, the added layout background color will be automatically filled into the parent layout
stale
1.0.2 | 2023.11.24- Refactor the System Insets function in
SystemBarsController
to fix the problem that the maximum layout size cannot be calculated on Compose View - Added
SystemInsets.Paddings
andsetBaseBackgroundResource
,isVisible
functions toSystemBarsController
SystemBarsView
is obsolete, please start using the new way to customize the System Insets function- Added
View.applySystemInsets
,View.appendSystemInsets
,View.removeSystemInsets
methods
stale
1.0.1 | 2023.11.18- Fix the loading exception catching problem in
SystemBarsController
stale
1.0.0 | 2023.11.02- The first version is submitted to Maven
ui-extension
latest
1.0.4 | 2024.05.05- Integrate the parameters of the entry and exit animation methods in the
Fragment
extension - Remove the default transition animation in the
Fragment
extension and delete the related resource files - Added the
Fragment.viewBinding
method in theViewBinding
extension - Fix the problem that the layout inflate by
viewBinding
in theViewBinding
extension will not be automatically cached - Fix the problem that the
inflate
method in theViewBinding
extension cannot be loaded correctly when encountering<merge>
and<include>
type layouts - Adjust the
inflate
method in theViewBinding
extension to ignore theattachToParent
parameter when encountering<merge>
and<include>
type layouts - Remove all deprecated methods in the old version of the
ViewBinding
extension
stale
1.0.3 | 2024.03.08- Removed
Factory
suffix from all extension methodkt
files - Removed deprecated files in the previous version
- The
ViewLayoutParams
method ofViewFactory
now supports theAbsListView.LayoutParams
type - Added
updateCompoundDrawables
andupdateCompoundDrawablesWithIntrinsicBounds
methods inViewFactory
- Added
parent
andparentOrNull
methods inViewFactory
- Added
walkToRoot
,walkThroughChildren
,indexOfInParent
methods inViewFactory
- Added
child
,childOrNull
,firstChild
,lastChild
,firstChildOrNull
,lastChildOrNull
methods inViewFactory
- Merge the
inflate
method inViewFactory
intoLayoutInflaterFactory
and deprecated the original method - Added
addToBackStack
parameter to the add methods inFragmentFactory
- The
commitTransaction
method is deprecated inFragmentFactory
and is now migrate to the officialfragment-ktx
dependency - Added
themeResId
method inResourcesFactory
- Added new
ViewBinding
solution and deprecated the old solution
stale
1.0.2 | 2024.01.02- Some package names that are not classified according to the standard have been moved, if you encounter an error, please re-import these calling methods
- Modified related names for Java calls
- Added
updatePadding
method inViewFactory
that can set horizontal and vertical directions - The
inflate
method inViewFactory
will automatically useActivity.getLayoutInflater
- Renamed
ColorsFactory
toColorFactory
- Renamed
toMixColor
inColorFactory
tomixColorOf
- Some methods in
ColorFactory
will now no longer throw exceptions - Added
GradientDrawableCompat
, you can use it to createGradientDrawable
for versions below Android 10 - Added
updatePadding
method inDrawableFactory
that can set horizontal and vertical directions asDp
,asPx
and its usage inDimensionFactory
are obsolete because of its design error, and are now connected to the new usagetoDp
,toPx
- Added
DisplayDensity
, you can easily usedp
,px
to convert units - Deprecated
getDimensionPx
inResourcesFactory
, please usetoPx
to calculate manually - Deprecated
isSpecialWindowingMode
inResourcesFactory
andActivityFactory
, please do not use it again - Added
getFontCompat
method inResourcesFactory
- Fix the usage error of
commt
related functions inFragmentFactory
- A large number of related usages in
FragmentFactory
have been modified, now please refer to the documentation to start using the new usages - Added
compressBitmap
method inBitmapFactory
- Added
Window.toast
method inToastFactory
- The
toast
method inToastFactory
has a newallowBackgroud
parameter, you can now allowToast
to show in non-main threads - Some methods in
WindowFactory
will now no longer throw exceptions - A new method in
WindowFactory
can be used to set the screen brightness using theFloat
type - Use
WindowInsetsController
inViewFactory
to show or hide the input method and rename the methods toshowIme
,hideIme
- Deprecated
ViewLayoutParam
class, please use theViewLayoutParams
method instead - Added
duration
parameter toperformKeyPressed
inViewFactory
- Added
updateMargin
method inViewFactory
that can set horizontal and vertical directions - Methods in
ActivityFactory
wereinline
processed - Added each
startActivityOrElse
method inActivityFactory
- The
round
method inBimapFactory
now supports setting the corner radius in each direction
stale
1.0.1 | 2023.11.18- Fix the problem of incorrect return value of
getColor
andgetColorStateList
methods in ResourcesFactory
stale
1.0.0 | 2023.11.02- The first version is submitted to Maven
system-extension
latest
1.0.1 | 2024.01.02- Renamed some incorrectly named methods in
SystemVersion
- Added
name
attribute inSystemVersion
- Caching
SystemKind
detection results to prevent repeated creation of reflection objects - Deprecated
get
inSystemKind
, now please use thecurrent
property to get the current system type. - Renamed some incorrectly named methods and classes in
ApplicationFactoy
- Removed
FLAG
prefix inAplicationInfoFlagsWrapper
- Modified the related usage in
BroadcastFactory
, now please refer to the documentation to use the new usage to create runtime broadcasts - Modified the relevant usage in
ClipboardFactory
, now please refer to the document to use the new usage to use the clipboard function - Methods in
ServiceFactory
wereinline
processed - Added
startServiceOrElse
andstartForegroundServiceOrElse
methods inServiceFactory
stale
1.0.0 | 2023.11.02- The first version is submitted to Maven
permission-extension
Not yet released.
compose-extension
latest
1.0.2 | 2024.01.16- Added
HapticFeedback
method, you can set it to any click or touch event ComponentPadding
adds aNone
method, you can use it to directly getComponentPadding(0.dp)
- Modified
onDismissRequest
inDialog
to make it mandatory to exist, matching the usage in the officialfoundation
- Optimize some code styles
stale
1.0.1 | 2024.01.08- Removed some useless
@Stable
annotations - Added
borderOrElse
method with the same name and new usage - Added
AdaptiveRow
,AdaptiveColumn
stale
1.0.0 | 2024.01.02- The first version is submitted to Maven
compose-multiplatform
latest
0.1.0 | 2024.01.02- The first version is submitted to Maven