Back to project page AndroidViewAnimations.
The source code is released under:
MIT License
If you think the Android project AndroidViewAnimations listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.daimajia.androidanimations; /*from w w w . j av a 2s .c om*/ import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.daimajia.androidanimations.library.Techniques; import com.daimajia.androidanimations.library.YoYo; public class ExampleActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.example); final TextView t = (TextView) findViewById(R.id.notice); t.setText("Please input your Email and Password"); findViewById(R.id.submit).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { YoYo.with(Techniques.Tada) .duration(700) .playOn(findViewById(R.id.edit_area)); t.setText("Wrong password!"); } }); final TextView t2 = (TextView) findViewById(R.id.notice2); t2.setText("Please input your Email and Password"); findViewById(R.id.submit2).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { YoYo.with(Techniques.Shake).playOn(findViewById(R.id.edit_area2)); t2.setText("Wrong password!"); } }); } }