title: How to make a Hidden layout Visible Using Button Click?
body: <p>Here in this code I have tried some touch screen event  </p>
  
  <pre><code>    @Override
  public boolean onTouchEvent(MotionEvent touchevent) {
  
      switch (touchevent.getAction())
      {
          case MotionEvent.ACTION_DOWN:
          {
              oldTouchValue = touchevent.getX();
              break;
          }
          case MotionEvent.ACTION_UP:
          {
              float currentX = touchevent.getX();
              if (oldTouchValue &lt; currentX  &amp;&amp; panel.getVisibility() == View.VISIBLE)
              {                   
                  panel.clearAnimation();
                  panel.startAnimation(mAnimHide);
                  panel.setVisibility(View.INVISIBLE);
  
              }
              if (oldTouchValue &gt; currentX  &amp;&amp; panel.getVisibility() == View.INVISIBLE)
              {
                  panel.setVisibility(View.VISIBLE);
                  panel.startAnimation(mAnimShow);
              }
          break;
          }
      }
  
  
      return false;
  }
  </code></pre>
  
  <p>//when i tried the below its not working</p>
  
  <pre><code>public void onClick(View v) {
      switch(v.getId())
      {
      case R.id.onClick:
      }
      if(panel.getVisibility()==View.INVISIBLE)
      {
          panel.setVisibility(View.VISIBLE);
          panel.startAnimation(mAnimShow);
      }
  }
  </code></pre>
  
  <p>When I Tried to have to make the Hidden Layout Visible on the Button Click 
  The program is not Responding. I have tried enough.</p>
  
  <p>Can anyone please help me? How should we make the action event work ?</p>