Log contains a lot of messages: bindView method of this item should set the `Tag` on its itemView
panovvitalik opened this issue · 4 comments
-
When the app starts in menu appear there is a message in log:
E/FastAdapter: The bindView method of this item should set theTag
on its itemView (https://github.com/mikepenz/FastAdapter/blob/develop/library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java#L189) -
When I scroll menu - more and more of such messages appear - they fill up log file
-
Possibly problem is in ExpandableDrawerItem or SecondaryDrawerItem classes. When the menu contains only PrimaryDrawerItem items no such error messages
Code to reproduce the issue:
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
Yes it could be that for expandable items this condition is not reached: https://github.com/mikepenz/FastAdapter/blob/develop/fastadapter/src/main/java/com/mikepenz/fastadapter/listeners/OnBindViewHolderListenerImpl.kt#L24
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