1

Basically, I am trying to scroll through a HorizontalScrollView using the native Accelerometer Y-axis measurements.

It is working in some senses, need to fine tune quite a few things but the scroll view does move from start to finish with just shaking left and right keeping the tablet in a constant plane.

However, I can do this all by tilting the device too, I don't want this to be the case, I want the HorizontalScrollView to move solely with shaking in the positive and negative directions of the Y plane.

Is is very affected by this tilting motion, I thought rotation was measured by a gyroscope and the Accelerometer measurement acceleration of a device in a certain plane?

It is early days and I have a few ideas but I was wondering if anyone has come across this before?

Cheers.

mgibson
  • 6,103
  • 4
  • 34
  • 49
  • what do you mean by accelaration in y-axis only.what exactly you are trying – nayab Jan 12 '13 at 20:42
  • Ok, so say you have a `HorizontalScrollView` on a desk, and you move it from left to right. It is completely flat and only moving left to right. This is all I want to affect the scrolling but in free space. However, if you imagine the y axis, where you move the device up and down on a flat desk.. When the devices rotates about the x axis perpendicular to the axis I care about, it really affects the accelerometer – mgibson Jan 14 '13 at 16:12
  • The problem is it gives me the same affect as moving through free space when it rotates. I don't want this as it affects the readability of the message. Thanks for the response – mgibson Jan 14 '13 at 16:17
  • Yes,when you move in free space gravtiy component will effect – nayab Jan 14 '13 at 16:33

0 Answers0