title: ClassCastException on support-library-v7 , using version 21
body: <h2>Background</h2>
  
  <p>Over the past 2 weeks I've been moving my app from ActionBarSherlock to the official support library of Google, to also gain Material-Design style.</p>
  
  <p>I've updated to the newest one (which is 21), and I've included both v4 and v7 of it.</p>
  
  <p><a href="https://play.google.com/store/apps/details?id=com.lb.app_manager"><strong>My app</strong></a> has a simple navigation-drawer , an action-bar, and a fragment container to switch between the fragments (which I only have 2). The rest of the screens are the settings screen and shortcuts to OS's tools. I also have a widget-configuration screen, but that's irrelevant . </p>
  
  <h2>The problem</h2>
  
  <p>I got a crash from a user that claims it crashes every time, on LG-G2, with Android 4.4 :</p>
  
  <pre><code>java.lang.ClassCastException: android.support.v7.internal.widget.m cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams
  at com.android.internal.widget.ActionBarOverlayLayout.applyInsets(ActionBarOverlayLayout.java:172)
  at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:317)
  at android.view.View.measure(View.java:16538)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
  at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
  at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2374)
  at android.view.View.measure(View.java:16538)
  at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1964)
  at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1160)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1342)
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1047)
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5896)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
  at android.view.Choreographer.doCallbacks(Choreographer.java:574)
  at android.view.Choreographer.doFrame(Choreographer.java:544)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
  at android.os.Handler.handleCallback(Handler.java:733)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5105)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
  at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <h2>The XML I use</h2>
  
  <p>Here's a short version of the XML I use for the layout:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
          android:id="@+id/activity_app_list__drawerLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent" &gt;
  
              &lt;FrameLayout
                  android:id="@+id/activity_app_list__fragmentContainer"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_above="@+id/activity_app_list__adContainer"
                  android:layout_alignParentTop="true" /&gt;
  
              &lt;FrameLayout
                  android:id="@+id/activity_app_list__adContainer"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_alignParentBottom="true" /&gt;
          &lt;/RelativeLayout&gt;
  
          &lt;ScrollView
              android:id="@+id/activity_app_list__drawerView"
              android:layout_width="240dp"
              android:layout_height="match_parent"
              android:layout_gravity="start"
              android:background="?android:attr/windowBackground" &gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical" &gt;
  
                  &lt;==just some views for the drawer...
              &lt;/LinearLayout&gt;
          &lt;/ScrollView&gt;
  
      &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <h2>What I've found</h2>
  
  <p>I've searched the Internet, and found almost nothing about this problem.</p>
  
  <p>The only thing I've found is <a href="https://github.com/jfeinstein10/SlidingMenu/issues/528"><strong>this post</strong></a>, but they don't tell how and why it happens. Plus I don't even use this library, and I'm not sure it's the same error. The tip there was to remove the next code:</p>
  
  <pre><code>(ViewGroup)findViewById(android.R.id.content).setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
  </code></pre>
  
  <h2>The question</h2>
  
  <p>Why does it occur? How can I fix it?</p>
  
  <p>Will using the tip on the post help?</p>