-
Notifications
You must be signed in to change notification settings - Fork 55
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
Using large amount (50+) of head items with listener and static background. #27
Comments
I will add a method, to set a static background and test the result. |
See the latest git version. I have add an option, to set a static background. I will release the next version, if i have found the sliding tab bug. |
Thanks for adding a static method!! I downloaded the latest apk from the github link and your 100+ static background seems to be failing on my end. 04-19 21:28:10.726 E/AndroidRuntime(32054): java.lang.OutOfMemoryError: Failed to allocate a 3111708 byte allocation with 2044872 free bytes and 1996KB until OOM Any ideas? |
Here is the full logs 04-19 21:30:44.496 E/AndroidRuntime(833): Process: de.madcyph3r.MaterialDrawer, PID: 833 |
Do you use images for the headItem avatar? |
I've been using TextDrawable's as the avatar heads, and this stack trace is from the sample app. |
Ok, then i must implement lazy load for the icons. |
Hey madcyph3r,
First off great lib! its freaking awesome!!!
I'd like to use this lib in a project where i have an array of custom objects and am using this array to build the head items. Sometimes i may have up to 50+ custom objects in the array and need a head item for each one. I'd like to have a static background between them. Or a way to load the background initially for the first item then only on head item change. (I ran into memory issues when setting the same background (~12kb jpg) to 50+ header items).
I need to be able to load the custom object from the array based on the position of the head item that was clicked (either by avatar clicked or from extra menu).
I'd attempted to use bits and pieces from the header item types 5 item with extra menu and i can successfully build 50+ header items with a transparent xml background and a onheaditemchange listener. However this listener seems to only be being called when i click the avatars and not when clicking from the extra menu (not sure why).
Any advise or explanation on how to go about this would be greatly appreciated. Also do you have in the pipeline a demo with large amounts of head items or something similar to my query? thanks for your time.
The text was updated successfully, but these errors were encountered: