SuperToasts icon indicating copy to clipboard operation
SuperToasts copied to clipboard

Super toast does not keep showing when i finish the activity

Open SouhaibBenFarhat opened this issue 7 years ago • 8 comments

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

SouhaibBenFarhat avatar Jul 10 '17 21:07 SouhaibBenFarhat

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

ga25 avatar Jul 22 '17 04:07 ga25

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

SouhaibBenFarhat avatar Jul 22 '17 21:07 SouhaibBenFarhat

Try to clear project,and rebuild it.

ga25 avatar Jul 23 '17 14:07 ga25

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

SennaGehenna avatar Oct 27 '17 06:10 SennaGehenna

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

ga25 avatar Oct 31 '17 06:10 ga25

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

SennaGehenna avatar Oct 31 '17 06:10 SennaGehenna

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 avatar Oct 31 '17 07:10 ga25

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

ga25 avatar Oct 31 '17 07:10 ga25