1

I am creating an app with flavors in it. In main project I have 12 items but I want only 6 items in my product flavor. I have copied menu files from main project to flavor res directory. Still it shows 12 items in flavor app. Please help. Thanks in advance !

enter image description here

src
  >> menu
      > java
          >com.example.demo.activity
      >res
         > layout
         > menu
         > nav_drawer.xml`enter code here`
       > drawable

   >> foo
       > java
          >com.example.demo.activity
       >res
          > layout
          > menu
             > nav_drawer.xml 
          > drawable
Risk
  • 23
  • 1
  • 7

1 Answers1

1

Hello @Risk you can change navigation drawer menus using android flavor

You just create two separate layout for navigation drawer and check when app is load which flavor is loaded and then display layout according to the flavor. I hope you understand. May it will help you.

Nilesh Panchal
  • 1,059
  • 1
  • 10
  • 24