it will work like that but you need to code it so that it works right.
the routine itself doesn't do much, you need to use it in a timer.
when the button is clicked you check the edittext value if it's "" enable the timer where the shake is in and let it shake for 10 times or so and then disable the timer again.
Sub Globals
Private EditText1 As EditText
Private shake As Animation
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1") 'Includes EditText1
shake.InitializeTranslate("", -10dip, 0, 10dip, 0)
shake.RepeatCount = 5
shake.RepeatMode = shake.REPEAT_REVERSE
shake.Duration = 50
End Sub
Sub Activity_Click
shake.Start(EditText1)
End Sub