Start a Project

how to make your users aware of something went wrong by vibration and shake effect

In this blog, I will show you how can we aware the users for the wrong input or something went wrong. There are simple two way to alert your users or customer for the wrong input.

  1. Vibrate your Device
  2. Shake the Views or text

Vibrate Your Device

Step 1: Create the object for the Vibrator class,

Step 2: Below is the block of code for which vibrate the device for the 200 millisecond,

Step 3: Add permission in Manifest.xml

 

Shake the View or text

Step 1: Create your shake error file,

Step 2: Create the Interpolator,

Step 3: Apply on Views or text which you want to Shake or wobble,

If you have any doubt on this blog, please ask in comments. And stay updated and stay super.

 

 

 

 

 

 

 

Exit mobile version