code-mc / material-icon-lib Goto Github PK
View Code? Open in Web Editor NEWLibrary containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.
License: Other
Library containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.
License: Other
Can I use it? if not, can you add this feature?
I see MaterialIconView
extends ImageView
. So, is there anyway to display material icon in an existed ImageView
?
Just a small correction. Both Material Design Icons and the Google stock icons need to be referenced in the license contained in the project.
Awesome project by the way! If I get a bit I'll get it referenced on the getting started page.
There are few items in https://materialdesignicons.com/ which are not present in this library. Please include them.
The following icons are missing:
Hi, I have a crash when run on device support api 16. I checked closed issue #32 but it isn't helpful
It can be an error when inflating some class. Can you show me the solution to deal with it. Thanks you.
The error is:
05-20 15:32:39.929 8920-8920/vn.gofime.gofime E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{vn.gofime.gofime/vn.gofime.gofime.pagemainmap}: android.view.InflateException: Binary XML file line #0: Error inflating class net.steamcrafted.materialiconlib.MaterialIconView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class net.steamcrafted.materialiconlib.MaterialIconView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at vn.gofime.gofime.pagemainmap.onCreate(pagemainmap.java:355)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at vn.gofime.gofime.pagemainmap.onCreate(pagemainmap.java:355)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f08005d a=-1 r=0x7f08005d}
at android.content.res.Resources.loadDrawable(Resources.java:1897)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.(View.java:3336)
at android.widget.ImageView.(ImageView.java:114)
at android.widget.ImageView.(ImageView.java:110)
at net.steamcrafted.materialiconlib.MaterialIconView.(MaterialIconView.java:30)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at vn.gofime.gofime.pagemainmap.onCreate(pagemainmap.java:355)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I am trying to use your library in project. But I am getting error when i add
compile 'net.steamcrafted:materialiconlib:1.0.3' in build.gradle
Error getting:
Error:(33, 13) Failed to resolve: net.steamcrafted:materialiconlib:1.0.3
The issue stems from the format for this attribute in the attributes file being "color" instead of "color|reference". This is an isolated issue to certain devices, specifically Samsung devices. When manually importing the library files and editing this, it fixes it.
Is possible support load separate SVG file
It seems that this library has a partial support for actionbar (builder.setToActionbarSize();
). Can we use it the Toolbar
component?
Toolbar icons are defined in resources/menu
as following:
<item
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_action_navigation_refresh"
app:showAsAction="ifRoom"
android:title="@string/menu_refresh"/>
So we cannot blindly replace it with the <net.steamcrafted.materialiconlib.MaterialIconView />
tag. Is there any way to do it in another way?
Hello,
Since this morning, I am not able to instantiate the class in a layout. AndroidStudio gave me this exception :
java.lang.RuntimeException: Font asset not found materialdesignicons-webfont.ttf at android.graphics.Typeface.createFromAsset(Typeface.java:206) at net.steamcrafted.materialiconlib.MaterialIconUtils.getTypeFace(MaterialIconUtils.java:21) at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.<init>(MaterialDrawableBuilder.java:55) at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.with(MaterialDrawableBuilder.java:67) at net.steamcrafted.materialiconlib.MaterialIconView.init(MaterialIconView.java:71) at net.steamcrafted.materialiconlib.MaterialIconView.init(MaterialIconView.java:75) at net.steamcrafted.materialiconlib.MaterialIconView.<init>(MaterialIconView.java:32) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:475) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:262) at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:220) at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:186) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:334) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:345) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:245) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:567) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:549) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:863) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:549) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$1(RenderTask.java:680) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Thank you for your answer
MaterialDrawableBuilder drawable = MaterialDrawableBuilder.with(this).setColor(Color.WHITE).setIcon(MaterialDrawableBuilder.IconValue.LIBRARY_MUSIC).build();
navigationView.getMenu().findItem(R.id.nav_library).setIcon(drawable);
Doing this results in NullPointerException in NavgationMenuItemView
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable()' on a null object reference
at android.support.design.internal.NavigationMenuItemView.setIcon(NavigationMenuItemView.java:114)
at android.support.design.internal.NavigationMenuItemView.setIconTintList(NavigationMenuItemView.java:144)
at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.getView(NavigationMenuPresenter.java:325)
This only happens with design support lib 22.2.0.+. Worked fine till 22.2.0. Also broken on v23.
After updating from 1.0.7 to 1.0.9 all icons that i set, are changed. for ex : i used the icon CALENDAR and now i get montains icon. I try clean build but nothing work, have you any idea ?
thanks
Thomas
this error
Asset not found: materialdesignicons-webfont.ttf
When using MaterialIconView in a clickable parent (a ListView for example), the ripple effect happening when clicking the parent lags and seems to contain artifacts.
The ListView has only one element. Tried on a OnePlusOne with no application in the background (so lag isn't because of a heavy work happening in the background).
Using standard ImageView or ImageButton component works well.
Error:(2722) Attribute "materialIcon" already defined with incompatible format.
Error:(901) Original attribute defined here.
Error:(2722) Attribute "materialIcon" already defined with incompatible format.
Error:(901) Original attribute defined here.
ps:i crash with system attr , make the name diff can help
Hi Team
My name is Farid. I'm a developer with great interest in making open source contributions to popular projects.
My company - DevFactory - is sponsoring me to improve unit test coverage in open source projects.
I have analysed material-icon-lib and observed that there is room for improvement of coverage. The results indicate that the project has:
Coverage: 0%, Total Lines: 733
If you are interested in having us work towards improving the project’s coverage to 80%, please let me know and we will add it to our pipeline. Our first step will be to create a pull request with a sample. Once you approve it, we'll follow up with one or two more pull requests. Our target is to increase code coverage to above 80 percent.
For an example of our work, please see these Pull Requests accepted by the community:
I'm looking forward to your confirmation.
Thank you,
Mohd Farid
Open Source Code Coverage Team
DevFactory
hello, oreo icons are wrong. Is the update coming? when?
I assume that this lib is going to get updated with new icons from the community @ materialdesignicons.com. I'd like to know how often.
Thanks for the lib, it's very useful :)
Not all the icons from https://materialdesignicons.com are getting synced into the project. Any ideas?
Regards
Can you please give a small tutorial how we can update library with lastest ttf file from materialdesignicons.com?
Thanks in advance.
P.S: I like to contribute if you help me on how to get list of icons from ttf.
After 1.1.4 (so 1.1.4 and 1.1.5) most icons are making no sense to begin with..
Instead of lock, i see a flower. Instead of PDF i see something not related, etc.
Will this ever be fixed?
Is it possible to use the library when configuring the navigation drawer icons?
hello ,
I am changing icon color at runtime its working good in other device but not in Samsung Galaxy Note 4 .
please provide solution for me.
I have added the .ttf file inside the Assets folder, added the gradle dependency. Unfortunately, I am unable to choose the required material icon.
In this (app:materialIcon="icon_name") xml code, I am unable to choose the required icon by the corresponding name. I have verified with various names. However, I am able to choose an icon by entering some integer value (app:materialIcon="1211"). Have I missed something somewhere? I retried the .ttf and gradle procedure but in vain. What seem to be the issue?
Regards
Not all the icons from https://materialdesignicons.com are getting synced into the project. Any ideas?
"image" and "image_broken_variant" still no
Regards
Hi. please update list icons. thanks
https://github.com/Templarian/MaterialDesign
When I was trying to create a drawable icon in a kotlin project:
val test1 = MaterialDrawableBuilder.with(applicationContext)
.setIcon(MaterialDrawableBuilder.IconValue.WEATHER_RAINY)
.setColor(Color.WHITE)
val test2 = test1.build()
Then Android Studio show a error:
Type net.steamcrafted.materialiconlib.MaterialDrawableBuilder.MaterialDrawable! is inaccessible in this context due to: net.steamcrafted.materialiconlib.MaterialDrawableBuilder.MaterialDrawable!
I was only import net.steamcrafted.materialiconlib.MaterialDrawableBuilder
Is this a bug or my mistake?
Hope someone can solve this problem, very thanks!
When I set app:materialIcon="pen", it's OK.
But when I set app:materialIcon="calendar-text", I get error like this.
Error:(62, 35) String types not allowed (at 'materialIcon' with value 'calendar-text').
PS: Autocomplete is not work. And I put the font file inside the assets already.
Hi,
How can i use icons within buttons of my my context menu layout. my context menu layout is like:
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/btnShare"
style="@style/ContextMenuButton"
android:drawableRight="@android:drawable/ic_menu_share"
android:text="@string/share.menu.share"
android:textColor="@color/btn_context_menu_text_red" />
<Button
............
报错:android.view.ViewGroup$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
Hey,
the drawable created from the MaterialDrawableBuilder does not support the Drawable.setBounds, for example when used in custom views...
as workaround i had to create a new drawable for each size change and move the object with translate, which is not very optimal...
I added the dependency in the gradle file and during the sync. I am getting this error
This project is really great, do you have any plan to support font awesome as well? It will be great if everything is in a project.
The Layout Editor shows an issue on API 24.
API 23 shows no issues.
java.lang.NullPointerException
at android.graphics.Typeface.createAssetUid(Typeface.java:219)
at android.graphics.Typeface.createFromAsset(Typeface.java:193)
at net.steamcrafted.materialiconlib.MaterialIconUtils.getTypeFace(MaterialIconUtils.java:24)
at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.(MaterialDrawableBuilder.java:55)
at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.with(MaterialDrawableBuilder.java:67)
at net.steamcrafted.materialiconlib.MaterialIconView.init(MaterialIconView.java:73)
at net.steamcrafted.materialiconlib.MaterialIconView.init(MaterialIconView.java:77)
at net.steamcrafted.materialiconlib.MaterialIconView.(MaterialIconView.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:176)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:317)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:520)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:508)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:967)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:508)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:75)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:620)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:617)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:371)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:617)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:639)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$7.run(AndroidDesignerEditorPanel.java:519)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Pls update in new icon.
Ty!
Please, add support for transparent colors for icons. Right now it ignores alpha channel and fill icon with black (for #1f000000 for example)
Hi, This is an awesome library. I am using it in the android studio. I have found that some of the icons which are listed on search are not available on the android studio. When I dig more found the icon which doesn't have an alias is not coming. I want to know how to use that icon in the android studio.
Unable to solve this and not sure why this happens.
Here is my stack trace:
Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.chalkstreet.app/com.chalkstreet.app.home.HomeActivity}: android.view.InflateException: Binary XML file line #385: Error inflating class net.steamcrafted.materialiconlib.MaterialIconView
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2338)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2390)
android.app.ActivityThread.access$800 (ActivityThread.java:151)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1321)
android.os.Handler.dispatchMessage (Handler.java:110)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:5292)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
dalvik.system.NativeStart.main (NativeStart.java)
arrow_drop_down
Caused by android.view.InflateException: Binary XML file line #385: Error inflating class net.steamcrafted.materialiconlib.MaterialIconView
android.view.LayoutInflater.createView (LayoutInflater.java:620)
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:696)
android.view.LayoutInflater.rInflate (LayoutInflater.java:755)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.parseInclude (LayoutInflater.java:839)
android.view.LayoutInflater.rInflate (LayoutInflater.java:745)
android.view.LayoutInflater.inflate (LayoutInflater.java:492)
android.view.LayoutInflater.inflate (LayoutInflater.java:397)
android.view.LayoutInflater.inflate (LayoutInflater.java:353)
android.support.v7.app.AppCompatDelegateImplV7.setContentView (AppCompatDelegateImplV7.java:280)
android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:140)
com.chalkstreet.app.home.HomeActivity.onCreate (HomeActivity.java:334)
android.app.Activity.performCreate (Activity.java:5264)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1088)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2302)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2390)
android.app.ActivityThread.access$800 (ActivityThread.java:151)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1321)
android.os.Handler.dispatchMessage (Handler.java:110)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:5292)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
dalvik.system.NativeStart.main (NativeStart.java)
arrow_drop_down
Caused by java.lang.reflect.InvocationTargetException:
java.lang.reflect.Constructor.constructNative (Constructor.java)
java.lang.reflect.Constructor.newInstance (Constructor.java:423)
android.view.LayoutInflater.createView (LayoutInflater.java:594)
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:696)
android.view.LayoutInflater.rInflate (LayoutInflater.java:755)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.parseInclude (LayoutInflater.java:839)
android.view.LayoutInflater.rInflate (LayoutInflater.java:745)
android.view.LayoutInflater.inflate (LayoutInflater.java:492)
android.view.LayoutInflater.inflate (LayoutInflater.java:397)
android.view.LayoutInflater.inflate (LayoutInflater.java:353)
android.support.v7.app.AppCompatDelegateImplV7.setContentView (AppCompatDelegateImplV7.java:280)
android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:140)
com.chalkstreet.app.home.HomeActivity.onCreate (HomeActivity.java:334)
android.app.Activity.performCreate (Activity.java:5264)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1088)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2302)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2390)
android.app.ActivityThread.access$800 (ActivityThread.java:151)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1321)
android.os.Handler.dispatchMessage (Handler.java:110)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:5292)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
dalvik.system.NativeStart.main (NativeStart.java)
arrow_drop_down
Caused by java.lang.NoClassDefFoundError: net.steamcrafted.materialiconlib.R$styleable
net.steamcrafted.materialiconlib.MaterialIconView.init (MaterialIconView.java:79)
net.steamcrafted.materialiconlib.MaterialIconView. (MaterialIconView.java:34)
java.lang.reflect.Constructor.constructNative (Constructor.java)
java.lang.reflect.Constructor.newInstance (Constructor.java:423)
android.view.LayoutInflater.createView (LayoutInflater.java:594)
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:696)
android.view.LayoutInflater.rInflate (LayoutInflater.java:755)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
android.view.LayoutInflater.parseInclude (LayoutInflater.java:839)
android.view.LayoutInflater.rInflate (LayoutInflater.java:745)
android.view.LayoutInflater.inflate (LayoutInflater.java:492)
android.view.LayoutInflater.inflate (LayoutInflater.java:397)
android.view.LayoutInflater.inflate (LayoutInflater.java:353)
android.support.v7.app.AppCompatDelegateImplV7.setContentView (AppCompatDelegateImplV7.java:280)
android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:140)
com.chalkstreet.app.home.HomeActivity.onCreate (HomeActivity.java:334)
android.app.Activity.performCreate (Activity.java:5264)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1088)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2302)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2390)
android.app.ActivityThread.access$800 (ActivityThread.java:151)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1321)
android.os.Handler.dispatchMessage (Handler.java:110)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:5292)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
dalvik.system.NativeStart.main (NativeStart.java)
In my app, I have two image views. One is using right arrow bold and the other is using left arrow bold, but for some reason, they are showing in the app as Japanese characters. Any reason why that is?
I will say this doesn't seem to be happening on every device or even every app I use this library on.
setAlpha
and getOpacity
methods can be misleading.
Alpha is usually an integer between 0-255 (as it is for setAlpha
), while opacity is a float from 0 to 1. What value do we retrieve when we call getOpacity
?
I think you should create a getAlpha
method and set getOpacity
as deprecated for better understanding on this point.
Awesome project though!
On Android Oreo wrong images are shown... :(
it is easy to use as a button.
Thank you for the fantastic library. Can we please have support for ImageButtons as well?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.