0

I have an application at present with main activity. i need to add navigationbar at bottom. am planning to have three things in this navigationbar (home, help, settings). now i have leaned to add navigationbar with fragments from http://www.truiton.com/2017/01/android-bottom-navigation-bar-example/

but it works only with fragments. my need is that when i click home i need to go to MainActivity page and also this drawer should be there in all activities

Yoni
  • 1,346
  • 3
  • 16
  • 38
  • I think the concept which you are missing is, you can use bottom navigation view in an activity and use 3 fragments home, help and settings. In such way you can still be on same activity and being on any page, bottom navigation you can see. – Pankaj Kumar Aug 29 '17 at 15:01
  • didn't get what u said – Sancy P Devassy Aug 29 '17 at 16:47

1 Answers1

0

Android Support Library compile 'com.android.support:design:25.0.0' has come up with the new bottomnavigationview which i think is what you need.

Refer to this link https://androidresearch.wordpress.com/2016/10/29/android-bottomnavigationview-example/

It shows bottomnavigationview with three fragments. Properly read the whole blog and you can customize on your own as needed.

Aman Verma
  • 3,155
  • 7
  • 30
  • 60
  • Original post states: "but it works only with fragments. my need is that when i click home i need to go to MainActivity page and also this drawer should be there in all activities". The blog link doesn't discuss 'activities' at all, just fragments. – iaindownie Dec 13 '18 at 16:23