Use this module to easily add Android toasts to your Framer Studio projects.
- Download the androidToast.coffee file.
- Create a Framer project and drop androidToast.coffee inside your /modules folder.
- Add
Android = require 'androidToast'
at the top of your document.
Before using this module, make sure to have the font Roboto-Regular installed
Sample Project can be found here.
More info about modules for Framer Studio: FramerJS Docs - Modules
You only need one line of code to make Simple Android Toast work. It looks a little something like this:
Android.Toast("By default, toasts are one line")
or, if your toast requires more than one line, the code could look like this:
Android.Toast("If your toast is a little longer, you can make your toast larger", "isTwoLines")
There are two parameters you can change: toastMessage and toastSize
toastMessage (string) -- This is your message you wish to show
toastSize (string) -- isTwoLines and isThreeLines will change the height of the toast
That's it! the toast will automatically animate in for you and destroy itself when there it's no longer visible. Simple.