在android4.0以下用以下代码可以实现自转的效果
RotateAnimation animationnew = new RotateAnimation(
0, 360, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f);
animationnew.setInterpolator(new LinearInterpolator());
animationnew.setDuration(1000);
animationnew.setRepeatCount(-1);
animationnew.setFillAfter(true);
但在android4.0版本及却不能正常的自转,而是以偏右下角的一个点为自转点。
请问高手们,
1,为什么会出现此现象?是安卓版本设计问题?还是升级版本有特殊设计?
2,如果在android4.0实现自转?Android
解决方案 »
- android 实现Call barring Settings
- Android UI下拉刷新 手势放大 高清图片异步加载 图片高速缓存 gallery循环滑动
- 求助! 芒果广告的奇怪问题,Eclipse报找不到AdMogoLayout类
- 求助高德地图开发 实现起点到终点过程中需要给过两个地点,如何画出行驶路线
- android seekbar垂直
- 我的真机启动不了了?????
- Android2.2自带Gallery程序问题
- 你们遇到过这种问题吗?
- 按钮事件空指针异常
- AsyncTask的onPostExecute方法中能调用另一个AsyncTask吗?
- OnClickListener出大错了
- android将一工程当做library工程遇到两个工程activity数据通信问题?
你试试 RotateAnimation animationnew = new RotateAnimation(0,360);
然后把你要转的view设置成
view.setPivotX(view.getWidth()/2);
view.setPivotY(view.getHeight()/2);