jmp-12 / SuperToasts

A library that extends the Android toast framework.
Apache License 2.0
2.67k stars 500 forks source link

Super toast does not keep showing when i finish the activity #117

Open SouhaibBenFarhat opened 7 years ago

SouhaibBenFarhat commented 7 years ago

how to keep showing super toast even when i start a new activity

ga25 commented 7 years ago

Please create superToast (not superActivityToast) in the class of Application which is independent of activity.

SouhaibBenFarhat commented 7 years ago

Thank you. that solve my problem... but i have a new issue, when i run the app that contain super toast on API 26 it always crash

ga25 commented 7 years ago

Try to clear project,and rebuild it.

SennaGehenna commented 7 years ago

in your module-level build.gradle file, set your targetSdk to 25, then you get compatibility mode for SDK 26 and it works again

not how this should be handled, but it works for sdk 26

ga25 commented 7 years ago

Do not set manually in your build.gradle file, try to set version of Comple and Build in "Build menu" as follow: Build-->Edit Build Types->Properties-->Comple Sdk Version OR Build Tools Version

SennaGehenna commented 7 years ago

Compile Sdk Version and Build Tools Version are not the same as targetSdk

Either way, use the platform toasts instead, they provide the same functionality and work out of the box without adding another dependency

ga25 commented 7 years ago

targetSdk is a compatibility declare, if targetSdk version is same as (or higher than ) Version of Compile Sdk , then app ignores compatibility. Otherwise, if API Sdk is too low, then error in "java.lang.VerifyError".

ga25 commented 7 years ago

SuperToast provides some cool functionalities which the platform toasts has not.