Materialdrawer: Custom layout for item by extending class as PrimaryDrawerItem not working

Created on 12 May 2016  路  1Comment  路  Source: mikepenz/MaterialDrawer

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?

question

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hosseiniSeyRo picture hosseiniSeyRo  路  3Comments

singhalavi picture singhalavi  路  4Comments

armoun picture armoun  路  3Comments

y2kshane picture y2kshane  路  4Comments

kakai248 picture kakai248  路  4Comments