With reference to this thread:
https://www.b4x.com/android/forum/threads/detect-current-orientation.109829/
This sub will assist you to determine the current orientation of your activity.
I noticed that the solutions to this one on the forum are quite complicated or resource intensive. Here...