1

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:

enter image description here

TGuerin
  • 345
  • 3
  • 18

1 Answers1

1

I would recommend using the standard navigation draw. You can find my examples here: https://github.com/jamesmontemagno/Xam.NavDrawer

JamesMontemagno
  • 3,782
  • 1
  • 12
  • 13
  • Thanks for your answer @JamesMontemagno, I think my problem comes from my SwipeRefreshLayout. When I disable it, all works perfectly. In the output, I have : `[SwipeRefreshLayout] Got ACTION_MOVE event but don't have an active pointer id.` Maybe the same problem here: [swiperefreshlayout got action move freezes](http://stackoverflow.com/questions/26973679/swiperefreshlayout-got-action-move-freezes-view) – TGuerin Apr 27 '15 at 18:46