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
Can not update item name in a drawer. #2208
Comments
@parmarravi which version of the library?
Your items need to have an identifier, and you can use this identifier then to update. As the javadoc already shows: |
what will be the identifier ? i am storing position of an item in Currentpos.
|
As shown in the README you can define whatever identifier you want: https://github.com/mikepenz/MaterialDrawer#add-items-and-adding-some-functionality If not, a identifier is automatically given to the item (after it was added to the drawer) |
Is there any code to refresh the layout ? Item name is still not getting updated. |
You used the |
Identifier is -12 .I am using latest version of drawer and updating method on ui thread. |
So you use |
Yes |
Ok let me have a closer look. I'll let you know. |
Ok I was able to identify a regression in the notify here: https://github.com/mikepenz/FastAdapter/blob/develop/library-core/src/main/java/com/mikepenz/fastadapter/utils/DefaultItemListImpl.java#L94 Will create an update ASAP and inform you when it's ready |
Thank you mike . |
Fixed in FastAdapter. will update the MaterialDrawer too soon |
With the help of this Mike , (Nameable) drawerItem) .getName().getText(MainActivity.this) I am able to get log and toast message now. only thing is, it's not getting updated to UI. |
don't do that :D I released a new FastAdapter version here: mikepenz/FastAdapter@1ecad22 and will update the drawer soon. Maven Central only needs a bit to sync releases |
New release done: https://github.com/mikepenz/MaterialDrawer/releases/tag/v6.0.6 It will take ~30 minutes until maven has synced and you can use it |
Its Working Mike thank you for the update . |
Thanks so much for this fix! |
Hello Mike,
Thank you for such a great library, i am having some issue when trying to update the name of an item in a drawer .this is what i am using
deviceAdd.updateName(Currentpos, new StringHolder("Name"));
It seems this code is not working .Is there any solution?
The text was updated successfully, but these errors were encountered: