-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating the description of an PrimaryDrawerItem #2445
Comments
In the meanwhile, I'm deleting the item and add it again at the same position, no problems at the moment |
https://github.com/mikepenz/MaterialDrawer#modify-items-or-the-drawer you can change the item, and then notify the drawer about the update:
|
` SecondaryDrawerItem Precio = new SecondaryDrawerItem()
` |
@lcapellanWork when you need to modify then, I highly recommend to either keep the reference to the item modify the object, and then notify the drawer about the change. Alternative you could give the items a unique identifier and retrieve the item via the identifier and do the same: Or you will just update the item at the position with a new element: |
in the meanwhile, I have a really not that memory-friendly of a solution, delete all the items, and reload it again since I save all of the data at an array, I tried to use the notify, but it gives me some kind of thread error. |
Can you please be a bit more specific related to the subitems? you change the subItem or you change just an item? perhaps you might check out v7.0.0-rc01 which comes with the fastAdapter v4 which might fixes this problem |
@mikepenz is there any way to update the
looks like Sorry for asking this question under this ticket, but I think this might be kinda related. |
@Guziq there is a specific method to update profiles: https://github.com/mikepenz/MaterialDrawer/blob/develop/library/src/main/java/com/mikepenz/materialdrawer/AccountHeader.kt#L201 |
As you may see, when we add a new PrimaryItem, we can add SecondaryItems as subitems, the problem is when I delete the parent, in this case, the primaryItem, the subitems (SecondaryItems) does not, and stay floating there. Is there a way to delete the parent and then the subitems be deleted with the parent? |
@lcapellanWork the most simple and best solution to this is to simply collapse the expanded item and remove the parent then. |
Mhmm gonna try that now, thanks for the help, a lot. |
I'm kind of using the MaterialDrawer as a shopping cart, everything is perfect, the only problem that I'm having is when trying to update the description of an item, as I have seen, can only update the bade, name, or the icon, but not the description, is there any way that I could update the description? in the meanwhile, I'm deleting de item and just adding it again, but is not an efficient way, and the item changes the position to the last place.
The text was updated successfully, but these errors were encountered: