Search code examples
androiddrawerlayout

Android DrawerLayout with sub views/fragements


I have added a Drawer Layout to my activity to be used for filtering (based on the eBay app filtering).

Drawer Initial layout

My issue is I can't work out how to click on "Features" which will then display a new view (appearing/transitioning from right to left) that allows me to filter the "Features".

Displayed when clicking on "Features

Any help would be greatly appreciated.


Solution

  • Initially, you can add a fragment, with your default content, on a layout component (can be a LinearLayout/RelativeLayout/etc). When you click on a menu item of your drawer, you will replace your fragment (another content).

    Hope this help you.