Java代码:启动动画

Animation shake = AnimationUtils.loadAnimation(this, R.anim.shake);          findViewById(R.id.pw).startAnimation(shake);  

anim/shake.xml

<translate xmlns:android="http://schemas.android.com/apk/res/android"      android:duration="500"      android:fromXDelta="0"      android:interpolator="@anim/cycle_7"      android:toXDelta="10" />  

duration为抖动时间,fromXDelta,toXDelta抖动幅度

anim/cycle_7.xml

<cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android"      android:cycles="10" />  

EditText

<EditText android:id="@+id/pw"          android:layout_width="match_parent"          android:layout_height="wrap_content"      />  


更多相关文章

  1. android用代码获取布局文件
  2. Android 代码扫描工具
  3. android 应用 Ant脚本自动编译、打包、代码混淆、签名、安装等
  4. Android中处理代码未捕获异常
  5. Android时间互换代码
  6. 【Android Demo】获取指定网页的页面源代码
  7. Android开源项目:捕鱼达人游戏源代码

随机推荐

  1. android调用其他人的so文件
  2. android,做一个定制化的TextView,在TextVie
  3. AlarmManager全局定时器/闹钟
  4. Android去掉标题栏点菜单键程序崩溃
  5. Android(安卓)-- 获取View宽高
  6. Android(安卓)Retrofit 源码系列(四)~ 文件
  7. Android(安卓)Eclipse 源码工程 调试
  8. 在eclipse中将android工程打包生成apk文
  9. WindowManager源码解析(一)
  10. 关于获取 android system feature 失败问