vikramkakkar / SublimeNavigationView

...is a complete rewrite of NavigationView (from Design Support library) that enables - usage of Checkboxes, Switches & Badges as menu items - XML definition - Parcelable menus - collapsible/expandable menu-groups - multiple menus - custom styling.
Apache License 2.0
309 stars 42 forks source link

setIcon Menu from folder Asset Programmatically #13

Open irsalshabirin opened 8 years ago

irsalshabirin commented 8 years ago

please give this feature, thanks before 👍

alashow commented 8 years ago

Why don't you just get drawable from assets?

http://stackoverflow.com/q/4884882/2897341

vikramkakkar commented 8 years ago

I'm with @alashow on this. Loading the drawable from assets is quite trivial. If there's another reason for this feature request, please let us know.

irsalshabirin commented 8 years ago

I'm sorry before, @alashow setIcon() just have a parameter int resId, can you give an example to setIcon with Drawable ?

@vikramkakkar I want to display the image with its original color. screenshot_2016-05-19-10-22-27_co dust lihatsekitar

vikramkakkar commented 8 years ago

I apologize for my last comment. I was under the impression that SublimeBaseMenuItem exposes a setIcon(Drawable) method. Turns out that it doesn't.

I will be adding this method in the next update.

I want to display the image with its original color.

The setIcon(Drawable) method will not fix this. All icons are tinted, and that's why they appear to have 'lost' color. Let me see if I can disable tinting on a per item basis.