The short answer is: yes probably it will work on both.
The longer answer is you'll be doing some work arounds. (and each is case dependent).
For example the arduino has analog pins, but AndroidThings boards do not - you would need to use a Analog to Digital converter (like this or any other ADC).
Android Things also supports GPIO. However if the sensor only uses GPIO, it is likely to require a fast communication speed (in the range of 10's of nano seconds), but Android Things GPIO is slow (the frequency is in the range of 300± nano seconds) - so you'll probably find these sensors are not supported on Android Things (a raspberry pi).
If after all that you buy a sensor and it won't work with Android Things - you can still use the sensor with an Arduino board and then control the Arduino Board with a Raspberry Pi as a master (like this).