code: public static void setTextDirection(TextView textView, int textDirection) {
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
              UiCompatNotCrash.setTextDirection(textView, textDirection);
          }
      }
docs: Sets the TextView text direction attribute when possible
  
  @param textView      TextView
  @param textDirection Text Direction
  @see TextView#setTextDirection(int)