{"id":13644831,"url":"https://github.com/riddhimanadib/BottomNavBar","last_synced_at":"2025-04-21T10:34:37.185Z","repository":{"id":141134537,"uuid":"88154664","full_name":"riddhimanadib/BottomNavBar","owner":"riddhimanadib","description":"Easily add four tabbed bottom navigation bar in your activity.","archived":false,"fork":false,"pushed_at":"2017-04-19T11:33:57.000Z","size":474,"stargazers_count":211,"open_issues_count":6,"forks_count":38,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-27T08:05:12.160Z","etag":null,"topics":["android","bottom-navigation","bottombar","bottomnavigationview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riddhimanadib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-13T10:44:06.000Z","updated_at":"2024-11-07T20:52:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec30424b-2091-4d7c-8695-8759c67e5030","html_url":"https://github.com/riddhimanadib/BottomNavBar","commit_stats":null,"previous_names":["riddhimanadib/bottomnavbar","adib2149/bottomnavbar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riddhimanadib%2FBottomNavBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riddhimanadib%2FBottomNavBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riddhimanadib%2FBottomNavBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riddhimanadib%2FBottomNavBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riddhimanadib","download_url":"https://codeload.github.com/riddhimanadib/BottomNavBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250040873,"owners_count":21365176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bottom-navigation","bottombar","bottomnavigationview"],"created_at":"2024-08-02T01:02:14.448Z","updated_at":"2025-04-21T10:34:32.169Z","avatar_url":"https://github.com/riddhimanadib.png","language":"Java","funding_links":[],"categories":["BottomNavigation"],"sub_categories":[],"readme":"Bottom-Nav-Bar\n==================\n\n\u003e Easily add four tabbed bottom navigation bar in your app.\n\n![](https://github.com/adib2149/BottomNavBar/blob/master/screenshot/screenshot.gif)\n\nThis library aids in adding four tabs in Bottom Navigation Bar, as easily and fast as possible. Th result looks like as it is commonly found in most of the apps, like Quora and others.\n\n\nDifference from Official [Bottom Navigation View](https://material.io/guidelines/components/bottom-navigation.html)\n-----------------\n- This library is significantly different from what Google has provided for Android Developers. The official Bottom Navigation View from Google doesn't show text when it has 4 tabs.\n\n![](https://github.com/adib2149/BottomNavBar/blob/master/screenshot/official_bottom_nav_bar.jpg)\n\n- this library helps you add icons and texts with four bottom bars very easily and efficiently, where all stays visisble all the time, just like this one here:\n\n![](https://github.com/adib2149/BottomNavBar/blob/master/screenshot/quora.jpg)\n\nFeatures\n-----------------\n- Easily add four tabbed bottom navigation bar with minimal code\n- changes color based on accent\n\n\nInstallation\n-----------------\nAdd this in your app's **build.gradle** file:\n```\ncompile 'me.riddhimanadib.bottom-nav-bar:bottom-nav-bar:1.0.1'\n```\n\n\nHow to use\n-----------------\n1. Create four fragments (fragment with appcompat v4) with layouts and method to create new instance.\n\n``` 'java'\npublic class SampleFragment extends Fragment{\n\n    public static FourthFragment newInstance() {\n        return new FourthFragment();\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.fragment_sample, container, false);\n    }\n\n}\n```\n2. Make your activity extend **BottomBarHolderActivity**\n``` 'java'\npublic class MainActivity extends BottomBarHolderActivity\n```\n3. Clear out setContentView() method and add the following:\n``` 'java'\n@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        // remove this: setContentView(R.layout.activity_main);\n\n        // four navigation pages that would be displayed as four tabs\n        // contains title, icon and fragment instance\n        NavigationPage page1 = new NavigationPage(\"Home\", ContextCompat.getDrawable(this, R.drawable.ic_home_black_24dp), FirstFragment.newInstance());\n        NavigationPage page2 = new NavigationPage(\"Support\", ContextCompat.getDrawable(this, R.drawable.ic_mail_black_24dp), SecondFragment.newInstance());\n        NavigationPage page3 = new NavigationPage(\"Billing\", ContextCompat.getDrawable(this, R.drawable.ic_assessment_black_24dp), ThirdFragment.newInstance());\n        NavigationPage page4 = new NavigationPage(\"Profile\", ContextCompat.getDrawable(this, R.drawable.ic_person_black_24dp), FourthFragment.newInstance());\n\n        // add them in a list\n        List\u003cNavigationPage\u003e navigationPages = new ArrayList\u003c\u003e();\n        navigationPages.add(page1);\n        navigationPages.add(page2);\n        navigationPages.add(page3);\n        navigationPages.add(page4);\n\n        // pass them to super method\n        super.setupBottomBarHolderActivity(navigationPages);\n    }\n```\n4. Now build and run!!\n\nChange accent color\n-----------------\nIf you want to change the colors, just override the colors in your **colors.xml** file:\n```'xml'\n\u003ccolor name=\"colorBackground\"\u003e#F8F8F8\u003c/color\u003e\n\u003ccolor name=\"colorNavAccentSelected\"\u003e#9D0E15\u003c/color\u003e\n\u003ccolor name=\"colorNavAccentUnselected\"\u003e#727272\u003c/color\u003e\n```\n\n\nLicense\n-----------------\nThis Library is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friddhimanadib%2FBottomNavBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friddhimanadib%2FBottomNavBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friddhimanadib%2FBottomNavBar/lists"}