Is this what you want to do Johan?
This solution is possible if your device has an Orientation Sensor (not all Androids do).