如何实现在Android上旋转控制

如何实现在Android上旋转控制

本文介绍了如何实现在Android上旋转控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人对如何创建一个旋转控制任何想法?一些看起来是这样的:的

Does anyone have any ideas on how to create a rotating control? Something that looks like this: http://www.raywenderlich.com/9864/how-to-create-a-rotating-wheel-control-with-uikit

我碰到2的博客文章是pretty的接近我需要的,但并不完全:

I came across 2 blog posts which is pretty close to what I need but, not quite:

http://mindtherobot.com/blog / 534 / Android系统UI制作-AN-模拟旋转旋钮/ 并    http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-rotating-dialer/

第一个并没有真正旋转时动画,和而第二个不动画,它使用一个大的位图并旋转。因为我在寻找控制实际上应该是容器的几个按钮(他们每个人都需要作出反应,点击),我真的不能用一个大的位图。

The first one doesn't really animate when rotating, and while the second one does animate, it uses one large bitmap and rotates it. Because the control I'm looking for should actually be container for a few buttons (they each need to react to clicks), I can't really use one large bitmap.

推荐答案

高达10 API,动漫作品在一个非常奇怪的方式,这样,如果你旋转/移动/缩放视图,其实际位置/旋转/大小不真正改变。如果你不介意,你可以简单地用一个旋转动画,与此类似: http://stackoverflow.com/ A /八十七万八千一百二十六分之四百八十四万六千二百五十五

up to API 10 , animation works in a very weird way so that if you rotate/move/scale views , their real position/rotation/size doesn't really change .if you don't mind about that , you can simply use a rotation-Animation , similar to this: http://stackoverflow.com/a/4846255/878126

这篇关于如何实现在Android上旋转控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 09:36