I have used the navigation drawer activity provided by android studio. So I have multiple layouts as xml. I did setContentView main_activity.xml. I was able to connect the variables using findViewById what's in the main screen. But when I tried to connect with the items inside the drawer, the findViewById finds the id from the xml file but it just returns null and gives me error. How can I fix this?
Asked
Active
Viewed 26 times
0
-
Look at this: https://stackoverflow.com/questions/40121656/where-to-findviewbyid-in-a-drawer-mainactivity – shadowsheep Dec 21 '18 at 22:33
-
Amazing. Thank you – PNANA Dec 21 '18 at 23:29