title: Android Theme.NoTitleBar doesnot work
body: <p>I am have a facebook like sliding menu bar in my app in which the two content and main layout of the app is handled by a Custom layout class.</p>
  
  <p>I want to remove the titlebar of my app </p>
  
  <p>Issue:</p>
  
  <p>Even though I place </p>
  
  <blockquote>
    <p>android:Theme.Light.NoTitleBar</p>
  </blockquote>
  
  <p>in my manifest there is a blank space of title bar. Due to which my whole layout is pushed downwards.</p>
  
  <p>I have tried using </p>
  
  <blockquote>
    <p>requestWindowFeature(Window.FEATURE_NO_TITLE);</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);</p>
  </blockquote>
  
  <p>but still the titlebar space is not removed.</p>
  
  <p>This is how the app looks like</p>
  
  <p><img src="https://i.stack.imgur.com/I9rYV.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/5NfFm.png" alt="enter image description here"></p>
  
  <p>I think this is caused due to the Custom LinearLayout class which holds the main sliding layout. But I am unable to remove the titlebar space from the custom layout class.
  Suggest a better solution.</p>
  
  <p>Custom Layout Class</p>
  
  <pre><code>   public class MainLayout extends LinearLayout {
          public MainLayout(Context context, AttributeSet attrs) {
              super(context, attrs);
          }
          public MainLayout(Context context) {
              super(context);
          }
  
          // Overriding LinearLayout core methods
          // layout based on the children
          @Override
          protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
              super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  
              mainLayoutWidth = MeasureSpec.getSize(widthMeasureSpec);
              menuRightMargin = mainLayoutWidth * 10 / 100;
          }
  
          @Override
          protected void onAttachedToWindow() {
              super.onAttachedToWindow();
              menu = this.getChildAt(0);
              content = this.getChildAt(1);   
              content.setOnTouchListener(new OnTouchListener() {
                  @Override
                  public boolean onTouch(View v, MotionEvent event) {
                      return MainLayout.this.onContentTouch(v, event);
                  }
              });
  
  @Override
      protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
          if(changed) {
             LayoutParams contentLayoutParams = (LayoutParams)content.getLayoutParams();
              contentLayoutParams.height = this.getHeight();
              contentLayoutParams.width = this.getWidth(); LayoutParams menuLayoutParams = (LayoutParams)menu.getLayoutParams();
          menuLayoutParams.width = this.getWidth() - menuRightMargin;          
          }
  
          menu.layout(left, top, right - menuRightMargin, bottom);
          content.layout(left + contentXOffset, top, right + contentXOffset, bottom);
  
        }
       }
  </code></pre>