Android输入框实现简单的抖动效果
来源:互联网 发布:建模软件对比分析 编辑:程序博客网 时间:2024/06/06 12:21
1. res/anim 新建shake.xml
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2007 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.--><translate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="1000" android:fromXDelta="0" android:interpolator="@anim/cycle_7" android:toXDelta="10"/>
2. res/anim 新建cycle_7.xml
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2007 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.--><cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:cycles="7"/>
3. 主程序
//为组件设置一个抖动效果Animation shake = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.shake);edit.startAnimation(shake)
阅读全文
0 0
- Android输入框实现简单的抖动效果
- Android输入框实现简单的抖动效果
- Android 实现输入框点击抖动的效果
- # 输入框的抖动效果
- 插补器实现输入框抖动效果
- jQuery--元素抖动效果的简单实现
- Android抖动的输入框
- Android抖动的输入框
- Android抖动的输入框
- android实现抖动效果
- android实现抖动效果
- Android实现界面组件的抖动效果
- Android实现界面组件的抖动效果
- Android实现界面组件的抖动效果
- android控件实现抖动的效果
- Android实现界面组件的抖动效果
- Android实现界面组件的抖动效果
- Android手机震动抖动效果的实现
- FaceBook 发布星际争霸最大 AI 数据集
- POJ1002算法解析
- DOM
- leetcode--Sort List
- 阿里云CentOS6.8下使用yum安装mysql,并远程登陆mysql
- Android输入框实现简单的抖动效果
- 秒杀系统设计,高并发下的下单功能设计
- 2016年国内主要浏览器的Chromium版本
- leetcode--Evaluate Reverse Polish Notation
- Linux之samba服务器的搭建及详解
- JDBC(连接数据库)
- socket技术详解(看清socket编程)
- arduino can总线实验,开源调试软件的串口数据包协议。
- leetcode--Reverse Words in a String