Giter Site home page Giter Site logo

spikeysanju / motiontoast Goto Github PK

View Code? Open in Web Editor NEW
1.4K 22.0 128.0 437 KB

๐ŸŒˆ A Beautiful Motion Toast Library for Kotlin Android

Kotlin 100.00%
kotlin kotlin-android kotlin-library androidstudio toastlibrary material-design android-app android-library android-development android-ui

motiontoast's Introduction

Hi i'm Spikey Sanju, Designer & Engineer, Founder of THISUX Design Studio , where ADHD meets Innovation!

๐Ÿ“Š Github Stats

Spikey Sanju | Stats

Reach me via

YouTube Twitter LinkedIn Dribbble Instagram Dev.To

Projects made with โค๏ธ

motiontoast's People

Contributors

andronicus-kim avatar dmitrykolpo avatar dserrano-bc avatar hpratsch avatar ketan-tetry avatar spikeysanju avatar xixiongmaoxiong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

motiontoast's Issues

Cannot customize colors?

Can we customise colors? These colors aren't our brand colors therefore we cant use this library if we can't change them.

Readme file contains some compile time error

Motion Toast (createToast) "Warning, Info and Delete " does not contain the message parameter thus when copied to android studio it causes error(Type Mismatch)

MotionToast.createToast(this,"Please fill all the details!",
MotionToastStyle.WARNING,
MotionToast.GRAVITY_BOTTOM,
MotionToast.LONG_DURATION,
ResourcesCompat.getFont(this,R.font.helvetica_regular))

Android Studio is unable to find the repo

Hi, When I build the project using the Motion Toast imports in project and app gradle files, the compiler gives me the following error ->

Execution failed for task ':app:checkDebugDuplicateClasses'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.Spikeysanju:MotionToast:1.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/Spikeysanju/MotionToast/1.4/MotionToast-1.4.pom
- https://repo.maven.apache.org/maven2/com/github/Spikeysanju/MotionToast/1.4/MotionToast-1.4.pom
- https://jcenter.bintray.com/com/github/Spikeysanju/MotionToast/1.4/MotionToast-1.4.pom
Required by:
project :app

Here's a copy of the gradle

Screen Shot 2021-11-18 at 11 21 28 AM

Fragment issue

Motion toast runs fine on Activities, but on fragments the context should be passed as activity (If there's a way to run it on a fragment do tell me ). Please fix it.

NEED SOLUTION - Fatal Exception: java.lang.NullPointerException

Fatal Exception: java.lang.NullPointerException: Can't toast on a thread that has not called Looper.prepare()
at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:157)
at android.widget.Toast.getLooper(Toast.java:179)
at android.widget.Toast.(Toast.java:164)
at android.widget.Toast.(Toast.java:154)
at www.sanju.motiontoast.MotionToast$Companion.darkColorToast(MotionToast.kt:978)
at com.aryomtech.dhitifoundation.public_notes.create_announcement$3.run(create_announcement.java:653)
at java.util.TimerThread.mainLoop(Timer.java:562)
at java.util.TimerThread.run(Timer.java:512)

Long description text not showing completely

Hi, there is issue in description text of toast. It shows only text in 2 lines and longer text not showing completely.

I noticed that you have set android:maxLines="2" to android:id="@+id/custom_toast_description" TextView in motion_toast.xml file.

Can you please make height of TextView open or increase maxLines.

Thanks

No class found after the latest update

Hello, after I updated to 1.3.3.2 all the imports are broken and the Studio can't seem to find anything to import.
I think you haven't added them to any repo.
I did:

  1. Clean
  2. Rebuild
  3. Invalidate Cache
  4. Restart Studio
  5. Restart PC

But did not work...

image

image

I have already added maven { url 'https://jitpack.io' }
to all repos in my root level build.gradle file but still not works...

verion 1.3.3.1 works fine.

No works, why?

if (checkConnect()) {
//toast(getString(R.string.no_internet_connection))
MotionToast.createToast(this,"This is information toast!",
MotionToast.TOAST_INFO,
MotionToast.GRAVITY_BOTTOM,
MotionToast.LONG_DURATION,
ResourcesCompat.getFont(this,R.font.helvetica_regular))
}

Sometimes opens many times in a row..... I dont undrstnd

Unable to use toast in a service

I am converting this kotlin toast into java and using it in activity. Here it works perfectly but when I tried to use it in a service the first argument of the MotionToast shows error as it doesn't accept 'this' as an argument. Hint is showed that it requires android.app.Activity as a first argument. It will be a pleasure to me and you if you solve this problem.

Localized String for toast title

As far as I understood, the title of the toast determined by the toast type, such as TOAST_ERROR, TOAST_WARNING etc.
Is there any way to custom assign the title text for language support except english.

Toast not working in a service

I am using your library in java language instead of kotlin. But I tried everything to use in the constructor of motion toast the first argument shows an error. I tried this, service_name.this, getapplicationcontext(). Then you said use service name.this.getapplicationcontext() but that also didn't worked. Solve this problem please. Thank You

Error

Error is given when I sync my project
Annotation 2020-03-16 050014

Toast doesn't get show/trigger and repeated calls for Toast result in error.

I tried to call the Toast from Fragment, on the Click of a Button. The Main Layout was MotionLayout if that helps.

On the button press, the toast is either delayed or never appears. Initially, I repeatedly pressed the button to trigger the Toast but the app crashed with the Exception stated below.

2020-08-19 18:47:29.961 6627-6627/ E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.omega.cart, PID: 6627
    java.lang.IllegalStateException: View android.widget.RelativeLayout{6e6c3c3 V.E...... ......I. 0,0-0,0 #7f0a00b2 app:id/color_toast_view} has already been added to the window manager.
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:328)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
        at android.widget.Toast$TN.handleShow(Toast.java:499)
        at android.widget.Toast$TN$1.handleMessage(Toast.java:403)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6692)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

setGravity

( E/Toast: setGravity() shouldn't be called on text toasts, the values won't be used) Why is this error coming?

Toast not working in a service

It is a normal floating service. First argument of Toast shows an error when I enter this,service_name.this,getapplicationcontext(),service_name.this.getapplicationcontext(). Nothing works. Please give a solution of this problem.

RTL support

Please support RTL for the rest of us.

Thank you very much for this awesome lib!

Customizing toast title

Could you take the title of the toast as a parameter? The hardcoded strings make it impossible to customize or localize. Thanks!

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.