Giter Site home page Giter Site logo

pranavpandey / dynamic-toasts Goto Github PK

View Code? Open in Web Editor NEW
158.0 10.0 25.0 3.07 MB

Custom toasts with color and icon on Android.

Home Page: https://dynamic.pranavpandey.com

License: Apache License 2.0

Java 100.00%
android library toast custom icon text error warning hint material-design

dynamic-toasts's Issues

Not working

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?

[Seggestion] for support systemlessly

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

update a toast

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?

Infinite toast

Hi,

How to make it show with infinite duration and only hide when i want?

Thanks.

No static method getFont

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

RTL Support

Dear support .
this library rtl supported !?

Request: support Android 11 (R - API 31)

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:

dfu6CwFaPM.zip

Custom Toasts are useful anyway usually only when the user is inside the app...

icon

i want add cutom icon but error in context:this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.