{"id":13644798,"url":"https://github.com/aurelhubert/ahbottomnavigation","last_synced_at":"2025-05-14T09:06:57.179Z","repository":{"id":41482842,"uuid":"54115435","full_name":"aurelhubert/ahbottomnavigation","owner":"aurelhubert","description":"A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.","archived":false,"fork":false,"pushed_at":"2021-07-10T21:57:52.000Z","size":5644,"stargazers_count":3830,"open_issues_count":144,"forks_count":684,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-05-14T09:06:23.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/aurelhubert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-17T12:17:56.000Z","updated_at":"2025-05-06T22:28:15.000Z","dependencies_parsed_at":"2022-09-21T10:13:34.504Z","dependency_job_id":null,"html_url":"https://github.com/aurelhubert/ahbottomnavigation","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurelhubert%2Fahbottomnavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurelhubert%2Fahbottomnavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurelhubert%2Fahbottomnavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurelhubert%2Fahbottomnavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aurelhubert","download_url":"https://codeload.github.com/aurelhubert/ahbottomnavigation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"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":[],"created_at":"2024-08-02T01:02:13.569Z","updated_at":"2025-05-14T09:06:57.128Z","avatar_url":"https://github.com/aurelhubert.png","language":"Java","readme":"\n# AHBottomNavigation\nLibrary to implement the Bottom Navigation component from Material Design guidelines (minSdkVersion=14).\n\n**Warning: For \u003e= 2.3.0, you need to use AndroidX in your project**\n\n## Demo\n\u003cimg src=\"https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo1.gif\" width=\"208\" height=\"368\" /\u003e \u003cimg src=\"https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo2.gif\" width=\"208\" height=\"368\" /\u003e \u003cimg src=\"https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo3.gif\" width=\"208\" height=\"368\" /\u003e \u003cimg src=\"https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo4.gif\" width=\"208\" height=\"368\" /\u003e\n\n## What's new (2.3.4) - [Changelog](https://github.com/aurelhubert/ahbottomnavigation/blob/master/CHANGELOG.md)\n* Fix a bug with the disappearing animation for the notification\n\n## Features\n* Follow the bottom navigation guidelines (https://www.google.com/design/spec/components/bottom-navigation.html)\n* Add 3 to 5 items (with title, icon \u0026 color)\n* Choose your style: Classic or colored navigation\n* Add a OnTabSelectedListener to detect tab selection\n* Support icon font color with \"setForceTint(true)\"\n* Manage notififcations for each item\n* Enable/disable tab state\n\n## How to?\n\n### Gradle\n```groovy\ndependencies {\n    compile 'com.aurelhubert:ahbottomnavigation:2.3.4'\n}\n```\n### XML\n```xml\n\u003ccom.aurelhubert.ahbottomnavigation.AHBottomNavigation\n        android:id=\"@+id/bottom_navigation\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"/\u003e\n```\nOR\n```xml\n\u003candroidx.coordinatorlayout.widget.CoordinatorLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    ...\n\n    \u003ccom.aurelhubert.ahbottomnavigation.AHBottomNavigation\n        android:id=\"@+id/bottom_navigation\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom\" /\u003e\n\n\u003c/androidx.coordinatorlayout.widget.CoordinatorLayout\u003e\n```\n\n### Activity/Fragment\n```java\nAHBottomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation);\n\n// Create items\nAHBottomNavigationItem item1 = new AHBottomNavigationItem(R.string.tab_1, R.drawable.ic_maps_place, R.color.color_tab_1);\nAHBottomNavigationItem item2 = new AHBottomNavigationItem(R.string.tab_2, R.drawable.ic_maps_local_bar, R.color.color_tab_2);\nAHBottomNavigationItem item3 = new AHBottomNavigationItem(R.string.tab_3, R.drawable.ic_maps_local_restaurant, R.color.color_tab_3);\n\n// Add items\nbottomNavigation.addItem(item1);\nbottomNavigation.addItem(item2);\nbottomNavigation.addItem(item3);\n\n// Set background color\nbottomNavigation.setDefaultBackgroundColor(Color.parseColor(\"#FEFEFE\"));\n\n// Disable the translation inside the CoordinatorLayout\nbottomNavigation.setBehaviorTranslationEnabled(false);\n\n// Enable the translation of the FloatingActionButton\nbottomNavigation.manageFloatingActionButtonBehavior(floatingActionButton);\n\n// Change colors\nbottomNavigation.setAccentColor(Color.parseColor(\"#F63D2B\"));\nbottomNavigation.setInactiveColor(Color.parseColor(\"#747474\"));\n\n// Force to tint the drawable (useful for font with icon for example)\nbottomNavigation.setForceTint(true);\n\n// Display color under navigation bar (API 21+)\n// Don't forget these lines in your style-v21\n// \u003citem name=\"android:windowTranslucentNavigation\"\u003etrue\u003c/item\u003e\n// \u003citem name=\"android:fitsSystemWindows\"\u003etrue\u003c/item\u003e\nbottomNavigation.setTranslucentNavigationEnabled(true);\n\n// Manage titles\nbottomNavigation.setTitleState(AHBottomNavigation.TitleState.SHOW_WHEN_ACTIVE);\nbottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_SHOW);\nbottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_HIDE);\n\n// Use colored navigation with circle reveal effect\nbottomNavigation.setColored(true);\n\n// Set current item programmatically\nbottomNavigation.setCurrentItem(1);\n\n// Customize notification (title, background, typeface)\nbottomNavigation.setNotificationBackgroundColor(Color.parseColor(\"#F63D2B\"));\n\n// Add or remove notification for each item\nbottomNavigation.setNotification(\"1\", 3);\n// OR\nAHNotification notification = new AHNotification.Builder()\n    .setText(\"1\")\n    .setBackgroundColor(ContextCompat.getColor(DemoActivity.this, R.color.color_notification_back))\n    .setTextColor(ContextCompat.getColor(DemoActivity.this, R.color.color_notification_text))\n     .build();\nbottomNavigation.setNotification(notification, 1);\n\n// Enable / disable item \u0026 set disable color\nbottomNavigation.enableItemAtPosition(2);\nbottomNavigation.disableItemAtPosition(2);\nbottomNavigation.setItemDisableColor(Color.parseColor(\"#3A000000\"));\n\n// Set listeners\nbottomNavigation.setOnTabSelectedListener(new AHBottomNavigation.OnTabSelectedListener() {\n\t@Override\n\tpublic boolean onTabSelected(int position, boolean wasSelected) {\n\t\t// Do something cool here...\n        return true;\n\t}\n});\nbottomNavigation.setOnNavigationPositionListener(new AHBottomNavigation.OnNavigationPositionListener() {\n\t@Override public void onPositionChange(int y) {\n\t\t// Manage the new y position\n\t}\n});\n```\n\n### With XML menu\n```java\nint[] tabColors = getApplicationContext().getResources().getIntArray(R.array.tab_colors);\nAHBottomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation);\nAHBottomNavigationAdapter navigationAdapter = new AHBottomNavigationAdapter(this, R.menu.bottom_navigation_menu_3);\nnavigationAdapter.setupWithBottomNavigation(bottomNavigation, tabColors);\n```\n\n## TODO\n* Manage tablet\n\n## Contributions\nFeel free to create issues / pull requests.\n\n## License\n```\nAHBottomNavigation library for Android\nCopyright (c) 2018 Aurelien Hubert (http://github.com/aurelhubert).\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["Java","BottomNavigation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurelhubert%2Fahbottomnavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurelhubert%2Fahbottomnavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurelhubert%2Fahbottomnavigation/lists"}