Android2.2 不支持setRotation和getRotation方法
来源:互联网 发布:java实现AES 编辑:程序博客网 时间:2024/04/29 15:56
FROM:http://www.eoeandroid.com/thread-332174-1-1.html
android2.2不支持setRotation和getRotation方法
这两个方法是View里面的方法,一个是设置旋转角度,一个是获取旋转角度。。。
在android3.0以上,是对的不报错。。。但是在android2.2就不行了//、、直接报错。。。求助啊。。。怎么让两个方法支持android2.2(API8)以上的啊
报这样的错误。。。java.lang.NoSuchMethodError: android.widget.TextView.setRotation
<span style="font-size:18px;">已经解决了。。stackoverflow上找到的方法。。。。if (Build.VERSION.SDK_INT < 11) { RotateAnimation animation = new RotateAnimation(progress, progress,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setDuration(100); animation.setFillAfter(true); textView.startAnimation(animation); } else { textView.setRotation(progress); }如果想要获取设置的角度的话,自定义一个View。。。。。就OK啦、。。。。。</span>
0 0
- Android2.2 不支持setRotation和getRotation方法
- setRotation
- Android2.2离线安装方法
- Android2.2和2.3有什么区别
- Android2.2 控件列表和层次
- android2.2
- 对象不支持此属性和方法
- Android2.2:'pthread_rwlock_t' does not name a type: android 2.3版本以下不支持读写锁的解决办法
- android2.2根据电话号码查询联系人姓名的方法
- android2.2中关闭程序中所有activity方法
- Android2.2中关闭所有界面,彻底退出的方法
- 在android2.2 中完全关闭程序的方法
- android2.2根据电话号码查询联系人姓名的方法
- 解决IE6不支持min-width和不支持max-width的方法。
- ocos2dx-lua采用pbc解析protobuf 不支持message嵌套和枚举不支持整数的处理方法
- Android2.2中添加的match_parent和fill_parent没有区别
- Android2.2中match_parent和fill_parent是一个意思(转)
- Android2.2中match_parent和fill_parent是一个意思
- 一劳永逸解决CheckBox状态丢失或者错乱的问题
- 简单的IO操作示例(不带缓存方式)
- Android中TextView与EditText控件实现禁止换行——诺诺"涂鸦"记忆
- HeadFirstJava学习心得——随机字符串的产生
- HTML文档类型的重要性
- Android2.2 不支持setRotation和getRotation方法
- C++ 结构体(二)
- 2_1_时间换算
- 蒙特卡洛方法与粒子滤波
- 笨蛋也可以用的 libsvm
- 在Eclipse for JavaEE中配置SDK
- Android 的Margin和Padding区别
- CODEVS_2800 送外卖 状态压缩+动态规划
- android 在eclipse中查看源码