Hello. Maybe I'm doing something dumb here but I really can't make it to work and I don't know why.
I'm building my AccountHeader
with some code like:
final ProfileDrawerItem profile = new ProfileDrawerItem().withName(mCurrentUserName)
.withEmail(mCurrentUserEmail)
.withIcon(mCurrentUserProfilePictureUrl);
AccountHeader header = new AccountHeaderBuilder().withActivity(this)
.withHeaderBackground(R.drawable.drawer_header)
.withActivity(this)
.addProfiles(profile)
.build();
I've also done this using the short way (passing a new ProfileDrawerItem
straight to the AccountHeaderBuilder
) but still no results.
I'm doing some Log.d()
's on the values that I'm passing and I'm pretty sure that they are not null. The name and email displays just fine but I'm having problems in getting to show the profile picture. It seems like it is showing a default image from my primary and accent colors and won't load the image in the URL that I passed.
Thanks for the help.
I think you miss this step:
https://github.com/mikepenz/MaterialDrawer#load-images-via-url
Or shown here in the sample app:
https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/CustomApplication.java#L18
Thanks! I thought image loading only applies to the drawer icons (but it was kinda obvious that the Profile icons needed that too. I really missed that part on the sample app. Thanks for pointing me to the right way. Thanks for maintaining this too.
@toyongbanatero no problem ;)
Most helpful comment
I think you miss this step:
https://github.com/mikepenz/MaterialDrawer#load-images-via-url
Or shown here in the sample app:
https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/CustomApplication.java#L18