Materialdrawer: Bad code example

Created on 4 Mar 2018  路  4Comments  路  Source: mikepenz/MaterialDrawer

The Glide example is very very bad. I don't know what there happens. Do I hava to put DrawerImageLoader.init before or after DrawerBuilder()...build()?
Where to put the image uri?
I don't understand what Glide.clear(imageView); does...
This is the worst example I have ever seen. It doesn't help, please improve.
https://github.com/mikepenz/MaterialDrawer/blob/6c7c52d6090ff9bfb04f12fdc8829440754e5739/app/src/main/java/com/mikepenz/materialdrawer/app/CustomApplication.java#L42

question

Most helpful comment

@Philipp97714 well this is open source. allowing you to improve. all source code is available. everything visible. if the sample is not meeting your standards you can always check out the in source code itself.

I am more than glad if there are PRs to improve javadoc in different areas.

As of this code. the DrawerImageLoader just needs to be initialized once before the drawer is used.

and Glide.clear is specific to glide, not to this library. it should be called if a view is no longer bound and the request should no longer be executed for this view

All 4 comments

@Philipp97714 well this is open source. allowing you to improve. all source code is available. everything visible. if the sample is not meeting your standards you can always check out the in source code itself.

I am more than glad if there are PRs to improve javadoc in different areas.

As of this code. the DrawerImageLoader just needs to be initialized once before the drawer is used.

and Glide.clear is specific to glide, not to this library. it should be called if a view is no longer bound and the request should no longer be executed for this view

@mikepenz Thank you for your reply. I'm an android beginner, so I have defficults in understanding everything. I copied the code into my project, but unfortunatelly only a placeholder is shown in the drawer. I hope I can get it fixed.

The sample uses glide v3. I think there were already some github issues in the past posting glide v4 sample code. You should be able to find it here in the issue section by searching

Close. Please report back if you have an update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jd-alexander picture jd-alexander  路  4Comments

Erwinstein picture Erwinstein  路  3Comments

HanderWei picture HanderWei  路  3Comments

Ahmed-Emad picture Ahmed-Emad  路  4Comments

fuentepa picture fuentepa  路  3Comments