title: Why MotionEvent.actionToString is not available to use?
body: <p>In Android SDK overriden method <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/view/MotionEvent.java#MotionEvent.toString%28%29" rel="nofollow">toString</a> use <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/view/MotionEvent.java#MotionEvent.actionToString%28int%29" rel="nofollow">actionToString</a> method as a have <strong>public static</strong> modificators. If you open source code you must see :</p>
  
  <pre><code> @Override
      public String toString() {
          StringBuilder msg = new StringBuilder();
          msg.append("MotionEvent { action=").append(actionToString(getAction()));
  
          final int pointerCount = getPointerCount();
          for (int i = 0; i &lt; pointerCount; i++) {
              msg.append(", id[").append(i).append("]=").append(getPointerId(i));
              msg.append(", x[").append(i).append("]=").append(getX(i));
              msg.append(", y[").append(i).append("]=").append(getY(i));
              msg.append(", toolType[").append(i).append("]=").append(
                      toolTypeToString(getToolType(i)));
          }
  
          msg.append(", buttonState=").append(MotionEvent.buttonStateToString(getButtonState()));
          msg.append(", metaState=").append(KeyEvent.metaStateToString(getMetaState()));
          msg.append(", flags=0x").append(Integer.toHexString(getFlags()));
          msg.append(", edgeFlags=0x").append(Integer.toHexString(getEdgeFlags()));
          msg.append(", pointerCount=").append(pointerCount);
          msg.append(", historySize=").append(getHistorySize());
          msg.append(", eventTime=").append(getEventTime());
          msg.append(", downTime=").append(getDownTime());
          msg.append(", deviceId=").append(getDeviceId());
          msg.append(", source=0x").append(Integer.toHexString(getSource()));
          msg.append(" }");
          return msg.toString();
      }
  </code></pre>
  
  <p>And if you open <strong>actionToString</strong> method <strong>in the SAME class</strong>:</p>
  
  <pre><code>public static String actionToString(int action) {
      switch (action) {
          case ACTION_DOWN:
              return "ACTION_DOWN";
          case ACTION_UP:
              return "ACTION_UP";
          case ACTION_CANCEL:
              return "ACTION_CANCEL";
          case ACTION_OUTSIDE:
              return "ACTION_OUTSIDE";
          case ACTION_MOVE:
              return "ACTION_MOVE";
          case ACTION_HOVER_MOVE:
              return "ACTION_HOVER_MOVE";
          case ACTION_SCROLL:
              return "ACTION_SCROLL";
          case ACTION_HOVER_ENTER:
              return "ACTION_HOVER_ENTER";
          case ACTION_HOVER_EXIT:
              return "ACTION_HOVER_EXIT";
      }
      int index = (action &amp; ACTION_POINTER_INDEX_MASK) &gt;&gt; ACTION_POINTER_INDEX_SHIFT;
      switch (action &amp; ACTION_MASK) {
          case ACTION_POINTER_DOWN:
              return "ACTION_POINTER_DOWN(" + index + ")";
          case ACTION_POINTER_UP:
              return "ACTION_POINTER_UP(" + index + ")";
          default:
              return Integer.toString(action);
      }
  }
  </code></pre>
  
  <p>But, when i try to use this method</p>
  
  <p><code>MotionEvent.actionToString(event.getAction);</code></p>
  
  <p>IDE tell me about error.</p>
  
  <p><code>Cannot resolve method actionToString(int);</code></p>
  
  <p>Why i getting this error?</p>
  
  <hr>
  
  <p>Link to the class methods :</p>
  
  <p><a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/view/MotionEvent.java#MotionEvent.actionToString%28int%29" rel="nofollow">actionToString method</a><br><br>
  <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/view/MotionEvent.java#MotionEvent.toString%28%29" rel="nofollow">toString method</a></p>