I am not looking for code, more an approach to the problem.
I wrote an app that uses the rotary knob view for some people over here in sunny Cyprus, where the knob is used to dial in a specific variable over up to five full turns covering 0 to 500 - 3.6 degrees per step. I have now been asked to a) save the last setting (easy) and b) to set the dial to that setting so that the user does not have to dial all the way up to the previous setting to make a small change (not so much!)
I thought the best way to do this would be to simulate either a touch or a rotation that stops each time the RKV increments one step, and then repeat this until the knob is set to the previously set number. The gesture detector would appear to be suited to this, using CreateMotionEvent and PassTouchEvent. I presume that X As float, Y As float refers to the position of the first touch with relation to the activity, as I cannot point to a specific view - i.e. the RKV.
My problem is that I can see no way the set the direction of the touch - if it is vertical, then nothing will happen! If I use a two-finger touch to rotate then I can set the view to the RKV, but again, how to control the direction.
It is possible (probable?) that I am taking entirely the wrong approach, in which case I would be very grateful to be pointed in the right direction. If, however, my approach is workable then I would appreciate some further information on how to proceed.
Thanks very much,
Chris C-B
I wrote an app that uses the rotary knob view for some people over here in sunny Cyprus, where the knob is used to dial in a specific variable over up to five full turns covering 0 to 500 - 3.6 degrees per step. I have now been asked to a) save the last setting (easy) and b) to set the dial to that setting so that the user does not have to dial all the way up to the previous setting to make a small change (not so much!)
I thought the best way to do this would be to simulate either a touch or a rotation that stops each time the RKV increments one step, and then repeat this until the knob is set to the previously set number. The gesture detector would appear to be suited to this, using CreateMotionEvent and PassTouchEvent. I presume that X As float, Y As float refers to the position of the first touch with relation to the activity, as I cannot point to a specific view - i.e. the RKV.
My problem is that I can see no way the set the direction of the touch - if it is vertical, then nothing will happen! If I use a two-finger touch to rotate then I can set the view to the RKV, but again, how to control the direction.
It is possible (probable?) that I am taking entirely the wrong approach, in which case I would be very grateful to be pointed in the right direction. If, however, my approach is workable then I would appreciate some further information on how to proceed.
Thanks very much,
Chris C-B