title: how to check previous value in android of viewflipper
body: <p><strong><em>I Have eight View flipper which have 4 Question and 4 Answers</em></strong>. Which is display those Question and Answers, whenever that particular viewflipper is clicked. My problem is, When first time any viewflipper is clicked, at that time nothing to do, and after on viewflipper is clicked the next clicked viewflipper value want to check which is same(equal) or not.(If Question is 5+3 then answers should be 8).</p>
  
  <p><strong>Condition:</strong></p>
  
  <blockquote>
    <ol>
    <li><p>if I am first time Q is clicked then next time another viewflipper which have  Q is clicked nothing check operation is necessary and nothing hide .</p></li>
    <li><p>if I am first time Q is clicked then next time A is clicked retrive value from textview of Q and check is it right or not, if it
    is right hide both Q and A.</p></li>
    <li><p>if I am first time A is clicked then next timeQ is clicked retrive value from textview of A and check is it right or not, if it
    is right hide both Q and A.</p></li>
    <li><p>if I am first time A is clicked then next time  another viewflipper which haveA is clicked nothing check operation is necessary nothing hide.</p></li>
    <li><p>if I am first time Q is clicked then next time same viewflipper which have Q is clicked nothing check operation is necessary nothing hide.</p></li>
    <li><p>if I am first time A is clicked then next time same viewflipper which have A is clicked nothing check operation is necessary nothing hide.</p></li>
    </ol>
  </blockquote>
  
  <p>So, How to check  Current clickable ViewFlipper and Previous clicked ViewFlipper. I did not get any idea how to check the problem.</p>
  
  <p>Look at this, I think, my problem is more clear.</p>
  
  <p><img src="https://i.stack.imgur.com/vXBbx.jpg" alt="enter image description here"></p>
  
  <p><strong>Edited: Dec 16</strong></p>
  
  <pre><code>@Override
  public void onClick(View v) {
  
      switch (v.getId()) {
      case R.id.vf1:
          try {
              if (click) {
                  Message msg = new Message();
                  msg.what = 1;
                  delayHandler.sendMessageDelayed(msg, DELAYTIME);
  
                  vFilpper1.showNext();
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          counter++;
          break;
      case R.id.vf2:
          try {
              Message msg = new Message();
              msg.what = 2;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 2");
  
              vFilpper2.showNext();
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
      case R.id.vf3:
          try {
              Message msg = new Message();
              msg.what = 3;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 3");
              vFilpper3.showNext();
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
  
      case R.id.vf4:
          try {
              Message msg = new Message();
              msg.what = 4;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 4");
              vFilpper4.showNext();
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
      case R.id.vf5:
          try {
              Message msg = new Message();
              msg.what = 5;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 5");
              vFilpper5.showNext();
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
      case R.id.vf7:
          try {
              Message msg = new Message();
              msg.what = 7;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 7");
              vFilpper7.showNext();
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
      case R.id.vf8:
          try {
              Message msg = new Message();
              msg.what = 8;
              delayHandler.sendMessageDelayed(msg, DELAYTIME);
              Log.d("viewfilpper", "VFlipper 8");
              vFilpper8.showNext();
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          break;
  </code></pre>