Android抖动的EditText
16lz
2021-01-23
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" />
更多相关文章
- android用代码获取布局文件
- Android 代码扫描工具
- android 应用 Ant脚本自动编译、打包、代码混淆、签名、安装等
- Android中处理代码未捕获异常
- Android时间互换代码
- 【Android Demo】获取指定网页的页面源代码
- Android开源项目:捕鱼达人游戏源代码