code: private boolean isRtlLayoutUsed() {
          return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 &&
                  getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
      }
docs: Returns, whether the activity uses a right-to-left (RTL) layout, or not.
  
  @return True, if the activity uses a RTL layout, false otherwise