mikepenz/MaterialDrawer

Log contains a lot of messages: bindView method of this item should set the `Tag` on its itemView

panovvitalik opened this issue · 4 comments

Toolbar top_toolbar = (Toolbar) parentView.findViewById(R.id.top_toolbar);
        DrawerBuilder drawerBuilder = new DrawerBuilder()
                .withActivity(getActivity())
                .withToolbar(top_toolbar)
                .withActionBarDrawerToggle(true)
                .withTranslucentStatusBar(false);

        drawerBuilder.addDrawerItems(
                new ExpandableDrawerItem().withName("").withSubItems(
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName(""),
                        new SecondaryDrawerItem().withName("")
                )
        );

drawerBuilder.withSelectedItem(-1); // to hide selection of any menu item
Drawer mMenu = drawerBuilder.build();

Details

  •  Used library version:
    com.mikepenz:materialdrawer:6.1.2

  •  Used support library version:
    'androidx.legacy:legacy-support-v4:1.0.0'
    'androidx.legacy:legacy-support-v4:1.0.0'
    'androidx.legacy:legacy-support-v13:1.0.0'

  •  Used gradle build tools version:
    com.android.tools.build:gradle:4.2.1

  •  Android Studio version:
    4.2.1

How can I resolve this issue?

Possibly problem is in ExpandableDrawerItem or SecondaryDrawerItem classes.

When the menu contains only PrimaryDrawerItem items no such many error messages. In this case there is only one message - when menu appears

It looks you are using the library still via Java.

Please note that only the latest version retrieves updates: https://github.com/mikepenz/MaterialDrawer#latest-releases- (v8.4.3) which is targeted for Kotlin.

Testing this with this version does not lead to this problem. Please consider to update the library

It looks you are using the library still via Java.

Please note that only the latest version retrieves updates: https://github.com/mikepenz/MaterialDrawer#latest-releases- (v8.4.3) which is targeted for Kotlin.

Testing this with this version does not lead to this problem. Please consider to update the library

Yes. But I can't use kotlin lib due to this bug:
#2786