-
Notifications
You must be signed in to change notification settings - Fork 58
Migration
Alexander Dadukin edited this page Mar 28, 2021
·
9 revisions
Renamed the following classes:
Was | Now |
---|---|
ExpandableBottomBarMenuItem | MenuItemDescriptor |
ItemBuildRequest | BuildRequest |
ExpandableBottomBarNotification | Notification |
Deprecated methods:
Was | Use |
---|---|
ExpandableBottomBar#getNotificationFor | expandableBottomBar.getMenuItemFor(id).notification() |
New methods:
Method | Description |
---|---|
ExpandableBottomBar#getMenuItemFor(@IdRes id: Int) | Returns menu item for the given id |
ExpandableBottomBar#getMenuItems() | Returns all menu items |
Introduced MenuItem
Migration XML declared menu property from app:exb_icon
to native android:icon
. Now you can reuse your whole android xml file between bottom bar and any android menu.
To avoid conflict in user custom view attributes names we have implemented view attributes extension exb_
and menu items.
Update note: really huge update, made with ❤️
Description | Was | Now |
---|---|---|
onItemClickListener removed |
bottomBar.onItemClickListener = { v, i -> } |
bottomBar.onItemSelectedListener = { v, i -> } |
ExpandableBottomBarMenuItem.Builder.addItem(Int, Int, CharSequence, Int) removed |
.addItem(R.id.icon_home, R.drawable.ic_home, "Raw Text", Color.GRAY) |
.addItem(R.id.icon_likes, R.drawable.ic_likes).text("Raw Text").colorRes(R.color.colorLike).create() |
constraint layout's behavior classes moved into behavior package |
app:layout_behavior="github.51.al.st235.lib_expandablebottombar.ExpandableBottomBarScrollableBehavior" |
app:layout_behavior="github.51.al.st235.lib_expandablebottombar.behavior.ExpandableBottomBarScrollableBehavior" |
Update note: for competent work with newer versions of the library, you may need to replace the Items Builders code.
Description | Was | Now |
---|---|---|
Changes at ExpandableBottomBarMenuItem.Builder 's constructor |
ExpandableBottomBarMenuItem.Builder() |
ExpandableBottomBarMenuItem.Builder(context = this) |