<i id='inG3b'><tr id='inG3b'><dt id='inG3b'><q id='inG3b'><span id='inG3b'><b id='inG3b'><form id='inG3b'><ins id='inG3b'></ins><ul id='inG3b'></ul><sub id='inG3b'></sub></form><legend id='inG3b'></legend><bdo id='inG3b'><pre id='inG3b'><center id='inG3b'></center></pre></bdo></b><th id='inG3b'></th></span></q></dt></tr></i><div id='inG3b'><tfoot id='inG3b'></tfoot><dl id='inG3b'><fieldset id='inG3b'></fieldset></dl></div>
        <legend id='inG3b'><style id='inG3b'><dir id='inG3b'><q id='inG3b'></q></dir></style></legend>
          <bdo id='inG3b'></bdo><ul id='inG3b'></ul>

        <small id='inG3b'></small><noframes id='inG3b'>

      1. <tfoot id='inG3b'></tfoot>

        如何创建转轮控件?

        How To Create a Rotating Wheel Control?(如何创建转轮控件?)
        <tfoot id='UVwx9'></tfoot>
          <tbody id='UVwx9'></tbody>
        <legend id='UVwx9'><style id='UVwx9'><dir id='UVwx9'><q id='UVwx9'></q></dir></style></legend>
        <i id='UVwx9'><tr id='UVwx9'><dt id='UVwx9'><q id='UVwx9'><span id='UVwx9'><b id='UVwx9'><form id='UVwx9'><ins id='UVwx9'></ins><ul id='UVwx9'></ul><sub id='UVwx9'></sub></form><legend id='UVwx9'></legend><bdo id='UVwx9'><pre id='UVwx9'><center id='UVwx9'></center></pre></bdo></b><th id='UVwx9'></th></span></q></dt></tr></i><div id='UVwx9'><tfoot id='UVwx9'></tfoot><dl id='UVwx9'><fieldset id='UVwx9'></fieldset></dl></div>
          <bdo id='UVwx9'></bdo><ul id='UVwx9'></ul>

        • <small id='UVwx9'></small><noframes id='UVwx9'>

                1. 本文介绍了如何创建转轮控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试在android中实现转轮,就像下面显示的图像.我从这个链接.但我想实现如下图所示.轮子由单独的图像组成.有人对这个实现有任何想法吗?任何帮助将不胜感激.

                  I am trying to implement the Rotatory wheel in android, just like the image displayed below.I came across the tutorial from this link. But i want to implement just as shown in the below image.The wheel consists of individual images.Does anybody have any idea regarding this implementation?? Any help would be appreciated.

                  提前致谢.

                  阿卡什

                  推荐答案

                  应用在imageView上的OnTouchListener上,通过它我得到了三个事件:

                  Applied on OnTouchListener on the imageView through which i got three events namely:

                  1. MotionEvent.ACTION_DOWN
                  2. MotionEvent.ACTION_MOVE &
                  3. MotionEvent.ACTION_UP.
                  1. MotionEvent.ACTION_DOWN,
                  2. MotionEvent.ACTION_MOVE &
                  3. MotionEvent.ACTION_UP.

                  在 MotionEvent.ACTION_DOWN 上获得用户触摸的角度,在 MotionEvent.ACTION_UP 上获得用户释放的角度.

                  On MotionEvent.ACTION_DOWN got the angle where the users touches and on MotionEvent.ACTION_UP got the angle where user releases.

                  得到两个角度的差异后,旋转那个角度的图像.

                  After getting difference of the two angles,rotated the image of that angle.

                  旋转图像后,通过角度检查象限并保持 int 变量,该变量根据象限递增,并通过满足条件设置新图像(所需的图像).

                  After rotating the image checked the quadrant through angle and maintained int variable which incremented according to the quadrant and by fulfilling the condition set the new image(the desired one).

                  根据int变量的值维护点击事件.

                  Maintained the click event according to the value of the int variable.

                  这篇关于如何创建转轮控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                  CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                  How to avoid restarting activity when orientation changes on Android(如何在 Android 上的方向更改时避免重新启动活动)
                  UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                  iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  How to capture current view screenshot and reuse in code? (iPhone SDK)(如何捕获当前视图屏幕截图并在代码中重用?(iPhone SDK))
                  <tfoot id='AHgUg'></tfoot>
                    <bdo id='AHgUg'></bdo><ul id='AHgUg'></ul>

                    <small id='AHgUg'></small><noframes id='AHgUg'>

                      <i id='AHgUg'><tr id='AHgUg'><dt id='AHgUg'><q id='AHgUg'><span id='AHgUg'><b id='AHgUg'><form id='AHgUg'><ins id='AHgUg'></ins><ul id='AHgUg'></ul><sub id='AHgUg'></sub></form><legend id='AHgUg'></legend><bdo id='AHgUg'><pre id='AHgUg'><center id='AHgUg'></center></pre></bdo></b><th id='AHgUg'></th></span></q></dt></tr></i><div id='AHgUg'><tfoot id='AHgUg'></tfoot><dl id='AHgUg'><fieldset id='AHgUg'></fieldset></dl></div>

                            <tbody id='AHgUg'></tbody>

                            <legend id='AHgUg'><style id='AHgUg'><dir id='AHgUg'><q id='AHgUg'></q></dir></style></legend>