Stacktrace:
09-10 07:56:56.448 24867-24867/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalArgumentException: DrawerLayout must
I tried lots of solution nothing worked.After a long time i found a solution by my self.
i was using Linear Layout as a parent of my inflating class i just replaced with Relative Layout
after that everything is working fine.For your better understanding given below is my code that i am using currently for inflating class
FrameLayout layoutContainer = (FrameLayout ) findViewById(R.id.container);
LayoutInflater layoutInflater = (LayoutInflater)
this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layoutContainer.addView(layoutInflater.inflate(R.layout.ecom_home_activity, null));
And ecom_home_activity is inflating class.The code of is given below.
Previously i was using Linear layout of ecom_home_activity class i just changed Linear layout with Relative layout
After that everything is working fine.In your case if you are using Linear Layout of your inflating class then Replace with Relative Layout.hope my answer will help you cheers.