Vector icons in drawer were crashing on an older Android

Need to find a way to specify them as srcCompat instead of src, but that's not obvious since it's through the material drawer library...
This commit is contained in:
Eugen Rochko 2017-03-09 19:47:46 +01:00
parent 7fa01371d9
commit 3cb1b8e44b
1 changed files with 4 additions and 4 deletions

View File

@ -141,10 +141,10 @@ public class MainActivity extends BaseActivity {
.withHasStableIds(true)
.withSelectedItem(-1)
.addDrawerItems(
new PrimaryDrawerItem().withIdentifier(1).withName(getString(R.string.action_view_favourites)).withIcon(R.drawable.ic_star_24dp).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(2).withName(getString(R.string.action_view_blocks)).withIcon(R.drawable.ic_block_24dp).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(3).withName(getString(R.string.action_view_preferences)).withIcon(R.drawable.ic_settings_24dp).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(4).withName(getString(R.string.action_logout)).withIcon(R.drawable.ic_exit_to_app_24dp).withSelectable(false)
new PrimaryDrawerItem().withIdentifier(1).withName(getString(R.string.action_view_favourites)).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(2).withName(getString(R.string.action_view_blocks)).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(3).withName(getString(R.string.action_view_preferences)).withSelectable(false),
new PrimaryDrawerItem().withIdentifier(4).withName(getString(R.string.action_logout)).withSelectable(false)
)
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override