Search code examples
androidsliding

how to keep background layout focused when touching sliding menu in android?


as android default ,when you touch the sliding menu,it gets focused from back ground layout but i want to keep the background focused. for example like viber app when you touch the setting,it pushes the background away but both of them (sliding menu and background layout ) are focused. this is my xml for layouts:

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"

  <FrameLayout

    <RelativeLayout

      <GridView

      </GridView>
    </RelativeLayout>

  </FrameLayout>

  <ListView

</android.support.v4.widget.DrawerLayout>

Solution

  • i found the answer. you should put this code in your main activity

      mDrawerLayout.SetScrimColor(Android.Resource.Color.Transparent);