Skip to content
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

AccountHeader Profile Image not loading via URL #720

Closed
Erwinstein opened this issue Oct 6, 2015 · 3 comments
Closed

AccountHeader Profile Image not loading via URL #720

Erwinstein opened this issue Oct 6, 2015 · 3 comments

Comments

@Erwinstein
Copy link

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.

@mikepenz
Copy link
Owner

mikepenz commented Oct 6, 2015

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

@mikepenz mikepenz self-assigned this Oct 6, 2015
@mikepenz mikepenz changed the title AccountHeader Profile Image AccountHeader Profile Image not loading via URL Oct 6, 2015
@mikepenz mikepenz closed this as completed Oct 6, 2015
@Erwinstein
Copy link
Author

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.

@mikepenz
Copy link
Owner

mikepenz commented Oct 6, 2015

@toyongbanatero no problem ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants