{"id":21130127,"url":"https://github.com/johnkil/SideNavigation","last_synced_at":"2025-07-09T01:32:25.997Z","repository":{"id":3648487,"uuid":"4716147","full_name":"johnkil/SideNavigation","owner":"johnkil","description":"Implementation of \"Side Navigation\" or \"Fly-in app menu\" pattern for Android (based on Google+ app)","archived":false,"fork":false,"pushed_at":"2013-12-02T05:41:48.000Z","size":1714,"stargazers_count":318,"open_issues_count":5,"forks_count":135,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-05-20T04:04:12.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://johnkil.github.com/SideNavigation","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnkil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-19T16:25:53.000Z","updated_at":"2025-03-23T00:52:20.000Z","dependencies_parsed_at":"2022-09-10T20:20:32.377Z","dependency_job_id":null,"html_url":"https://github.com/johnkil/SideNavigation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/johnkil/SideNavigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnkil%2FSideNavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnkil%2FSideNavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnkil%2FSideNavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnkil%2FSideNavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnkil","download_url":"https://codeload.github.com/johnkil/SideNavigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnkil%2FSideNavigation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264375391,"owners_count":23598369,"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-11-20T05:32:18.263Z","updated_at":"2025-07-09T01:32:25.580Z","avatar_url":"https://github.com/johnkil.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"Android SideNavigation Library\n==============================\n\nImplementation of \"Side Navigation\" or \"Fly-in app menu\" pattern for Android (based on Google+ app).\n\n\nDescription\n-----------\n\nThe Google+ app slides the navigation on top of the UI while the others move the UI to the side. \nGoogle+ also has the up caret icon and the action bar present when the menu is opened while other apps don't.\n\nThere was a interesting discussion about this pattern in the blog's Google+ page some time ago. \nYou can find the post \u0026 discussion here: [Google+](https://plus.google.com/115177579026138386092/posts/AvXiTF7LqDK).\n\nSample\n------\n\nA sample application is available on Google Play:\n\n\u003ca href=\"http://play.google.com/store/apps/details?id=com.devspark.sidenavigation.sample\"\u003e\n  \u003cimg alt=\"Get it on Google Play\"\n       src=\"http://www.android.com/images/brand/get_it_on_play_logo_small.png\" /\u003e\n\u003c/a\u003e\n\n![Example Image][1] ![Example Image][2]\n\nThe source code is available in this repository.\n\nCompatibility\n-------------\n\nThis library is compatible from API 4 (Android 1.6).\n\nInstallation\n------------\n\nThe sample project requires:\n\n* The library project\n* [ActionBarSherlock](https://github.com/JakeWharton/ActionBarSherlock)\n\nUsage\n-----\n\nSideNavigation is presented as an [Android library project](http://developer.android.com/guide/developing/projects/projects-eclipse.html).\nYou can include this project by [referencing it as a library project](http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject) in Eclipse or ant.\n\nTo display the item you need the following code:\n\n* Add SideNavigationView to the end of the layout. Example:\n\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" \u003e\n\n    \u003cImageView\n        android:id=\"@android:id/icon\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:src=\"@drawable/ic_android_logo\" /\u003e\n\n    \u003ccom.devspark.sidenavigation.SideNavigationView\n        android:id=\"@+id/side_navigation_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n\n\u003c/RelativeLayout\u003e\n```\n\n* Create '.xml' description of the menu for the sideNavigationView. Example:\n\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cmenu xmlns:android=\"http://schemas.android.com/apk/res/android\" \u003e\n\n    \u003citem\n        android:id=\"@+id/side_navigation_menu_item1\"\n        android:icon=\"@drawable/ic_android1\"\n        android:title=\"@string/title1\"/\u003e\n    \u003citem\n        android:id=\"@+id/side_navigation_menu_item2\"\n        android:icon=\"@drawable/ic_android2\"\n        android:title=\"@string/title2\"/\u003e\n    \u003citem\n        android:id=\"@+id/side_navigation_menu_item3\"\n        android:icon=\"@drawable/ic_android3\"\n        android:title=\"@string/title3\"/\u003e\n    \u003citem\n        android:id=\"@+id/side_navigation_menu_item4\"\n        android:icon=\"@drawable/ic_android4\"\n        android:title=\"@string/title4\"/\u003e\n    \u003citem\n        android:id=\"@+id/side_navigation_menu_item5\"\n        android:icon=\"@drawable/ic_android5\"\n        android:title=\"@string/title5\"/\u003e\n\n\u003c/menu\u003e\n```\n\n* Set home should be displayed as an \"up\" and initialize the sideNavigationView:\n\n``` java\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\tsetContentView(R.layout.activity_main);\n    // other code\n    \n    sideNavigationView = (SideNavigationView) findViewById(R.id.side_navigation_view);\n    sideNavigationView.setMenuItems(R.menu.side_navigation_menu);\n\tsideNavigationView.setMenuClickCallback(/*ISideNavigationCallback*/);\n\tsideNavigationView.setMode(/*SideNavigationView.Mode*/);\n        \n    getActionBar().setDisplayHomeAsUpEnabled(true);\n}\n```\n\n* Override onOptionsItemSelected() method for show/hide teh sideNavigationView:\n\n``` java\n@Override\npublic boolean onOptionsItemSelected(MenuItem item) {\n\tswitch (item.getItemId()) {\n\tcase android.R.id.home:\n\t\tsideNavigationView.toggleMenu();\n\t\tbreak;\n\tdefault:\n\t\treturn super.onOptionsItemSelected(item);\n\t}\n\treturn true;\n}\n```\n\n* Implementation of ISideNavigationCallback:\n\n``` java\nISideNavigationCallback sideNavigationCallback = new ISideNavigationCallback() {\n    \t\n\t@Override\n\tpublic void onSideNavigationItemClick(int itemId) {\n\t\t// Validation clicking on side navigation item\n\t}\n};\n```\n\nContribution\n------------\n\nPlease fork [dev](https://github.com/johnkil/SideNavigation/tree/dev) repository and contribute back using [pull requests](https://github.com/johnkil/SideNavigation/pulls).\n\nContributors are recommended to follow the Android [Code Style Guidelines](http://source.android.com/source/code-style.html).\n\nAny contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests are welcomed and appreciated but will be thoroughly reviewed and discussed.\n\nDeveloped By\n------------\n* Evgeny Shishkin - \u003cjohnkil78@gmail.com\u003e\n\nLicense\n-------\n\n    Copyright (C) 2012 Evgeny Shishkin\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[1]: http://i45.tinypic.com/f8jzn.png\n[2]: http://i48.tinypic.com/2naid6d.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnkil%2FSideNavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnkil%2FSideNavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnkil%2FSideNavigation/lists"}