I have my main activity as
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_incipient);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
TopClipsFragment topClipsFragment = TopClipsFragment.newInstance();
MyClipsFragment myClipsFragment= MyClipsFragment.newInstance();
fragmentTransaction.add(R.id.frame_container, myClipsFragment,"My");
fragmentTransaction.add(R.id.frame_container, topClipsFragment, "Top");
fragmentTransaction.commit();
}
and a layout file : panel.xml
as
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/voz_action_bar" >
</android.support.v4.widget.SlidingPaneLayout>
So what I am trying to do here is adding two fragments in SlidingPaneLayout in Activity's onCreate method. this thing works fine when I start my application. But when device orientation is changed than I get this exception
E/SlidingPaneLayout(2192): onMeasure: More than two child views are not supported
how can I handle orientation change in this case