title: Hide A Layout After 10 Seconds In Android?
body: <p>I have a layout displayed on a button click.I want to hide that layout after 10 seconds.</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      mVolHandler = new Handler();
      mVolRunnable = new Runnable() {
          public void run() {
              mVolLayout.setVisibility(View.GONE);
          }
      };
  }
  
  
  private OnTouchListener mVolPlusOnTouchListener = new OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
          mVolLayout.setVisibility(View.VISIBLE);
          mVolHandler.postDelayed(mVolRunnable, 10000);
      }
  }
  </code></pre>