I'm trying to inject the contentview
after extending SlidingFragmentActivity
from sliding menu library. But I'm getting error like
java.lang.IllegalStateException: Both setBehindContentView must be called in onCreate in addition to setContentView".
But it works fine if i set the content inside onCreate
. Can any one suggest solution for this?
You have to call setBehindContentView
yourself even when using @ContentView
. The @ContentView
annotation calls setContentView
for you in the onCreate
of the super class (RoboActivity), but not setBehindContentView
.