pranavpandey / dynamic-toasts Goto Github PK
View Code? Open in Web Editor NEWCustom toasts with color and icon on Android.
Home Page: https://dynamic.pranavpandey.com
License: Apache License 2.0
Custom toasts with color and icon on Android.
Home Page: https://dynamic.pranavpandey.com
License: Apache License 2.0
How to change the text color of message
Dear @pranavpandey
I am trying to use this framework in order to create a toast error message,
DynamicToast.makeError(context, "Email or Password not valid").show();
but this is the error I got:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.vaevictis.myapplication, PID: 10187
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/pranavpandey/android/dynamic/utils/DynamicColorUtils;
at com.pranavpandey.android.dynamic.toasts.DynamicToast.makeError(DynamicToast.java:241)
at com.example.vaevictis.myapplication.user.UserController$1.onResponse(UserController.java:49)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.pranavpandey.android.dynamic.utils.DynamicColorUtils" on path: DexPathList[[zip file "/data/app/com.example.vaevictis.myapplication-1/base.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.vaevictis.myapplication-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.vaevictis.myapplication-1/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.pranavpandey.android.dynamic.toasts.DynamicToast.makeError(DynamicToast.java:241)
at com.example.vaevictis.myapplication.user.UserController$1.onResponse(UserController.java:49)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Any clue of what can cause the problem?
Hi developer can you make such toast and custom toast style Xposed Module..
Xposed framework work on system to change any thing without touching apk..
You can use as LSposed module.
Hope you understand
how can update a DynamicToast? i have multiple toast and we need to show it in default of dynamic toast it show consequently and for example for 10 toast it show for 1 minute and one by one. but we need update last toast to new toast text and style. how can i do this?
Hi,
How to make it show with infinite duration and only hide when i want?
Thanks.
Hello Dear
i want to use this library in my project .
add in to dependencies and sync successfully . and use this command in my project like this :
DynamicToast.makeError(getApplicationContext(), "Error Message", Toast.LENGTH_SHORT).show();
and after run project , i faced "unfortunately app has stopped" . after that i read logs and see this error :
FATAL EXCEPTION: main Process: com.example.mohammad_pc.crm_android,PID:29510java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface; in class Landroid/support/v4/content/res/ResourcesCompat; or its super classes (declaration of 'android.support.v4.content.res.ResourcesCompat' appears in /data/app/com.example.mohammad_pc.crm_android-1/base.apk)
what is this ? guide me please
thank you
Dear support .
this library rtl supported !?
Sadly on Android R, you can't set a custom View for a Toast (when targeting API 31) :
https://developer.android.com/reference/android/widget/Toast#setView(android.view.View)
https://developer.android.com/reference/android/widget/Toast#getView()
Please offer something that mimics the standard Toast's look&feel, so that at least we could have it shown within the app, as a normal View.
Maybe something similar to what we have when we long press the action items on the toolbar:
Custom Toasts are useful anyway usually only when the user is inside the app...
i want add cutom icon but error in context: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.