title: how to disable a layout and its contents programatically in android
body: <p>I have 4 LinearLayouts in a RelativeLayout and I am also using an ImageView. When the ImageView is displayed I want to disable the 4 LinearLayouts and their contents. Each LinearLayout contains 4 buttons. Shown below is my function to disable and enable these layouts. Can someone help me understand why this isn't working?</p>
  
  <pre><code>private void disablelayout(final LinearLayout l1,final LinearLayout l2,final LinearLayout l3,final LinearLayout l4)
      {
          l1.setEnabled(false);
          l2.setEnabled(false);
          l3.setEnabled(false);
          l4.setEnabled(false);
  
      }
      private void enablelayout(final LinearLayout l1,final LinearLayout l2,final LinearLayout l3,final LinearLayout l4)
      {
          l1.postDelayed(new Runnable(){             
               @Override             
               public void run() {                 
                   l1.setEnabled(true); 
                   l2.setEnabled(true); 
                   l3.setEnabled(true); 
                   l4.setEnabled(true); 
               }         
               }, 3000);
      }
  </code></pre>