xiprox / errorview Goto Github PK
View Code? Open in Web Editor NEWA custom view that displays an image, a title, and a subtitle. Use it for errors, empty states, or just messages with images!
License: Apache License 2.0
A custom view that displays an image, a title, and a subtitle. Use it for errors, empty states, or just messages with images!
License: Apache License 2.0
Add the necessary methods and attributes in order to make it possible to set and toggle the error image's visibility.
Device: Nexus 5
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: java.lang.LinkageError: tr.xip.errorview.sample.MainActivity
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at dalvik.system.DexFile.defineClassNative(Native Method)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at dalvik.system.DexFile.defineClass(DexFile.java:226)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at dalvik.system.DexPathList.findClass(DexPathList.java:338)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-05 09:55:44.974 28433-28433/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Hello,
Have you seen this kind of errors before?
http://crashes.to/s/f59f7ecad55
Caused by android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f080078
at android.content.res.ResourcesImpl.getResourceName(ResourcesImpl.java:239)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:705)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:585)
at android.content.res.MiuiResourcesImpl.loadDrawable(MiuiResourcesImpl.java:308)
at android.content.res.Resources.loadDrawable(Resources.java:872)
at android.content.res.TypedArray.getDrawable(TypedArray.java:930)
at android.widget.ImageView.(ImageView.java:157)
at android.widget.ImageView.(ImageView.java:145)
at androidx.appcompat.widget.AppCompatImageView.(SourceFile:72)
at androidx.appcompat.widget.AppCompatImageView.(SourceFile:68)
at androidx.appcompat.app.AppCompatViewInflater.createImageView(SourceFile:182)
at androidx.appcompat.app.AppCompatViewInflater.createView(SourceFile:106)
at androidx.appcompat.app.AppCompatDelegateImpl.createView(SourceFile:1266)
at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(SourceFile:1316)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.inflate(LayoutInflater.java:496)
at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
at tr.xip.errorview.ErrorView.access$getRetryListener$p(SourceFile:74)
at tr.xip.errorview.ErrorView.(SourceFile:50)
at java.lang.reflect.Constructor.newInstance0(Constructor.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:652)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:812)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:989)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:879)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1019)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:879)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846)
at android.view.LayoutInflater.inflate(LayoutInflater.java:522)
at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
at androidx.databinding.DataBindingUtil.inflate(SourceFile:126)
at androidx.databinding.DataBindingUtil.inflate(SourceFile:95)
at my.app.BaseFragment.onCreateView(SourceFile:31)
at my.app.MyFragment.onCreateView(SourceFile:39)
at androidx.fragment.app.Fragment.performCreateView(SourceFile:2439)
at androidx.fragment.app.FragmentManagerImpl.moveToState(SourceFile:1460)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(SourceFile:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(SourceFile:1852)
at androidx.fragment.app.BackStackRecord.executeOps(SourceFile:802)
at androidx.fragment.app.FragmentManagerImpl.executeOps(SourceFile:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(SourceFile:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(SourceFile:2366)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(SourceFile:2273)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(SourceFile:3273)
at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(SourceFile:3229)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(SourceFile:201)
at androidx.fragment.app.FragmentActivity.onStart(SourceFile:620)
at androidx.appcompat.app.AppCompatActivity.onStart(SourceFile:178)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1249)
at android.app.Activity.performStart(Activity.java:6873)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2687)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Good day, thx for library.
I have issue on rendering view in android studio editor.
Failed to find style 'ev_style' in current theme
Hi, great library, but I have noticed that ErrorView is extending LinearLayout but it is also inflating xml layout with also defined LinearLayout instance. XML layout should instead use <merge>
tag.
http://trickyandroid.com/protip-inflating-layout-for-your-custom-view/
I'm trying to set a subtitle message that goes longer than one line of text.
The text then gets wrapped to more lines, but by default they are left aligned. Is there a way to set the text alignment to center that I may not be aware of?
Hey. Very handy library, thanks!
Are you going to refactor the project to AndroidX?
Or use Material Components for the retry button?
Will you accept a PR for this?
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.