First of all @mikepenz, It's a great library and so easy to use.
If I make a custom layout xml with the same name (material_drawer_item_primary.xml) It works good without any extended class.
But I try to have custom layout for items with extending a class, I copy material_drawer_item_primary.xml content to new file with a name dari_material_drawer_item_primary.xml and changed the layout not IDs.
And create a class for it:
public class DariPrimaryDrawerItem extends PrimaryDrawerItem {
@Override
public int getLayoutRes() {
return R.layout.dari_material_drawer_item_primary;
}
}
But it's not working don't use my layout. I want to have the default layout and in the same time have the custom layout too. One custom Primary RTL layout and Primary layout for LTR.
What I missed?
@rezawm you also have to overwrite getType() as you can see here:
https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.java
Most helpful comment
@rezawm you also have to overwrite
getType()as you can see here:https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.java