I'm trying to have my flyout menu working when adding fragment. So, I have a flyout menu working thanks to this code:
https://github.com/garuma/FlyOutMenu/tree/master/FlyOutMenu
<com.myApp.FlyOutContainer xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/FlyOutContainer">
<include
layout="@layout/menu_layout"
android:id="@+id/menu_layout" />
<include
layout="@layout/content_layout"
android:id="@+id/content_layout" />
</comm.myApp.FlyOutContainer>
At the start of my application, the content_layout
is composed of this layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include
layout="@layout/top_bar_layout"
android:id="@+id/top_bar_layout" />
<include
layout="@layout/root_layout"
android:id="@+id/root_layout" />
</LinearLayout>
After start, my activity add a fragment in the root_layout:
// Create new fragment and transaction
Fragment questionListFragment = new QuestionListFragment();
FragmentTransaction transaction = FragmentManager.BeginTransaction();
transaction.Add(Resource.Id.root_layout, questionListFragment);
// Commit the transaction
transaction.Commit();
This new fragment contains a swipe to refresh layout and a list view. When I swipe from the left to the right, the menu appears well. But to hide it (swipe from the right to the left), the menu in background.
Update:
I think the problem is on notifyDataSetChanged. My view isn't centered when the menu is open, and I update my listview. So when updating, my view is re-created and re-centered and the menu stay in background... How can I fix it ?
Here are screenshot to understand: (I can't post image on stackOverflow yet and no more than 2 links...)
Here is the problem: