Created
December 30, 2011 16:20
-
-
Save jdale38/1540485 to your computer and use it in GitHub Desktop.
Vibrating Toasts for Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class VibratingToast extends Toast { | |
| public VibratingToast(Context context, CharSequence text, int duration) { | |
| super(context); | |
| ((Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE)).vibrate(300); | |
| super.makeText(context, text, duration).show(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment