Closed wakaztahir closed 3 years ago
I have also put the loader in the onCreate function before the content view is even set but that did't work , Glide is loading the image fine in other places but the set function is just not being called. I would also like to know , how to have multiple items selected in the drawer Thanks in advance Also when I opened the project in android studio , It gave a content prolog error , I wanted to see the sample app code but I think the issue is that I don't see a xml root tag in the xml files of the app content is not allowed in prolog
@wakaztahir the imageloader should be set in the application to ensure it happened before the drawer is used. beyond that. your sample does not look like setting a url
as icon. it will only call the loader when it is needed (e.g. when you specify the url drawable to the item)
Thanks , as soon as I specified a url , it started working but the image is still displaying squared ! Do you have any idea how to make it circular and make it fit , Otherwise thanks for help
@wakaztahir usually image loaders provide APIs which allow you to transform the image to the needed form. e.g. ciruclar.
Beyond this. the ProfileDrawerItem
uses a BezelImageView
and applies the style as defined in the theme
https://github.com/mikepenz/MaterialDrawer/blob/develop/materialdrawer/src/main/res/layout/material_drawer_item_profile.xml#L16
Thanks I used
Glide.with(context).load(account?.photoUrl).placeholder(placeholder).circleCrop().into(imageView)
which did it !
About this issue
I placed a Log call inside the set function and it just does't call , I have a profile item like this
Details
Checklist