###Upgrade Notes
- depends on the latest
v23.1.0
support libraries. Those also require you to havecompileSDKVersion 23
- new
placeholder(Context ctx, String tag)
to theIDrawerImageLoader
interface - new
AbstractDrawerImageLoader
to simplify theDrawerImageLoader
usage. See the new implementation in theCustomApplication
- to keep the old behavior just change from
new DrawerImageLoader.IDrawerImageLoader() {
tonew AbstractDrawerImageLoader() {
for theDrawerImageLoader.init
- add new
tag
to the placeholder, to be able to define different placeholders for different targets
- no more need to define an identifier for the items, they get one automatically. if you do not have logics which require you to do so, you are safe to forget about the identifier now.
- renamed
setDivider()
towithDivider
- remove
setTypeface()
usewithTypeface()
instead
getCurrentSelection()
will now return theidentifier
of the current selection ornull
getCurrentSelectedPosition()
was added- renamed all
*Footer*
methods to*StickyFooter*
to prevent confusion
#####Common changes
- depends on the latest
v23
support libraries. Those also require you to havecompileSDKVersion 23
- change the
onItemClick
listener toonItemClick(View view, int i, IDrawerItem iDrawerItem)
- modify the import of the
AccountHeader
andAccountHeaderBuilder
to
import com.mikepenz.materialdrawer.AccountHeader
import com.mikepenz.materialdrawer.AccountHeaderBuilder
- the
identifier
should now be set for theDrawerItems
as it is used now as default for all update/modify/.. actions - rename
withCheckable()
towithSelectable()
- rename
set*
methods of theDrawerItems
towith*
methods as those were renamed - rename all methods like
setSelection
,setFooterSelection
,removeItem
, ... to*ByPosition
(added the ByPosition) - rename all methods like
setSelectionByIdentifier
,setFooterSelectionByIdentifier
, ... tosetSelection
,setFooterSelection
(removed the ByIdentifier) - change
updateName
,updateIcon
,updateBadge
those methods take now anidentifier
and the specificHolder
object - all
get*
methods of theDrawerItems
will now return aHolder
object for the specific type, making it easier to work with types likeString
,StringRes
,Color
,ColorRes
,ColorInt
, ..
#####Android-Iconics (icon font)
- the MaterialDrawer now only includes the
core
of the Android-Iconics project - add the fonts you use https://github.com/mikepenz/Android-Iconics#2-choose-your-desired-fonts
- pre MaterialDrawer v4.0.0 following fonts were included
compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar' //Google Material Design Icons
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar' //FontAwesome **NOTE:** the packagename changed for this font
#####Advanced usage changes
- changed the
ListView
to aRecyclerView
- rename methods with
*ListView*
to*RecyclerView*
- the
IDrawerItem
interface was extended to better reflect aRecyclerView
and to improve performance - added an
AbstractDrawerItem
to implement some common methods - see the SectionDrawerItem for an easy example