title: Android edittext onclick event handling and selection
body: <p>I have two edit text views. If I click first, I need to select first edittext and set to second "00". Like in default android alarm clock.
  My problem:</p>
  
  <ul>
  <li>I have api level 10, so I can't write something like:</li>
  </ul>
  
  <p><b></b></p>
  
  <pre><code>firstEText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
      @Override
      public void onFocusChange(View v, boolean hasFocus) {
          secondEText.setText("00");
      }
  });
  </code></pre>
  
  <p>If I use</p>
  
  <pre><code>firstEText.setOnKeyListener(new View.OnKeyListener() {
      @Override
      public void onFocusChange(View v, boolean hasFocus) {
          secondEText.setText("00");
      }
  });
  </code></pre>
  
  <p>so I need click my view twice. Possible solution:</p>
  
  <pre><code>firstEText.setOnTouchListener(new OnTouchListener() {
      public boolean onTouch(View view, MotionEvent event) {
          if (event.getAction() == MotionEvent.ACTION_DOWN) {
  
              //but with onTouch listener I have problems with 
              //edit text selection:
              ((EditText) view).setSelection(0, ((EditText) view).getText().length());
          }
          return false;
      }
  });
  </code></pre>
  
  <p>so my .setSelection does not always work. OMG! Help me please</p>