I have this layout
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/account_menu_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="30dp"
android:text="@string/lores_ipsum"/>
</android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.DrawerLayout>
and this inflation code:
final View content =
(View) inflater.inflate(R.layout.activity_account_menu2, coordinatorLayout, false);
which returns this error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.libraries.onegoogle.demoapp, PID: 14668
java.lang.IllegalArgumentException: DrawerLayout must be measured with MeasureSpec.EXACTLY.
at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1053)
I saw this post
but my layout has match_parent already.
how can it be that i get this exception?