title: Android development: 1st touch = TextView1, 2nd touch = TextView2 etc
body: <p>I need some help with with my android-program. I need to make few TextViews to appear on each touch. 1st touch = TextView1, 2nd touch = TextView2 etc. I tried to make it with ACTION_POINTER_DOWN after ACTION_DOWN, but it shows all Text Views in one touch.</p>
  
  <pre><code>    public boolean onTouch(View v, MotionEvent event) {
  
   boolean inTouch = false;
  
          int actionMask = event.getActionMasked();
          tv = (TextView) findViewById(R.id.textView3);
          tv1 = (TextView) findViewById(R.id.textView4);
          tv2 = (TextView) findViewById(R.id.textView5);
          tv3 = (TextView) findViewById(R.id.textView6);
          int pointerCount = event.getPointerCount();
           int downPI = 0;
          switch (event.getAction()) {
              case MotionEvent.ACTION_DOWN: // 1st touch
                  inTouch = true;
  
              case MotionEvent.ACTION_POINTER_DOWN: // next touches
                          downPI = pointerCount;
                          switch (downPI) {
                              case 0:
                                  tv.setVisibility(View.VISIBLE);
                                  break;
                              case 1:
                                  tv1.setVisibility(View.VISIBLE);
                                  break;
                              case 2:
                                  tv2.setVisibility(View.VISIBLE);
                                  break;
                              case 3:
                                  tv3.setVisibility(View.VISIBLE);
                                  break;
  
                          }
                          break;
  
  
          }
  
              return false;
  </code></pre>